Added: 4 years ago
From: jakeblanchard
Views: 71,837
Sort by time | Sort by thread (beta)

Link to this comment:

Share to:
see all

All Comments (40)

Sign In or Sign Up now to post a comment!
  • Good job!

  • wft is dis shitz?

  • sir

    i am looking for a similar presentation on genetic algorithm. would be very happy if you could upload a video on that topic.

  • where is the code?! plz! if it is the tutorial code needs to be included!

  • @repsieximo

    You can find the code here:

    blanchard "dot" ep "dot" wisc "dot" edu/PublicMatlab/index.html#Mo­nte

  • @jakeblanchard

    By the way, this isn't exactly the same code, but it's similar.

  • Ok, Dr. Blanchard. Here is MY question...my high school didn't require algebra or geometry because they needed to have math for farmers...also my undergrad work in psych is done....so: Am I screwed? My math is pitiful but I love this type of software and being able to test my own ideas. I might be too old to learn this stuff. Without math am I totally doomed??

  • @adamish1134

    Just about everything I do requires some amount of math...mostly calculus. I think you're either going to have to take some kind of class (many online classes are available these days) or buy a book and learn independently. Good luck. You might like it and you might find it easier than you think.

  • What I needed! Thanks for sharing.

  • Hi,

    That is really a great "learn by example". I was really anxious about approaching Monte Carlo simulation. You made it so clear that I am now going to jump in with lots of enthusiasm!

    Thanks!

  • You might be able to speed up the "for loop" approach a lot by preallocating the displacement vector before the loop.

    displacement = zeros(1,nsamples);

    Currently the speed is limited by constant reallocation of the vector at each loop iteration.

  • @nbsr1

    Good point. This is always a good practice and sometimes I'm lazy in this regard.

  • @jakeblanchard

    Actually, I just ran a test. Leaving the loop in and pre-allocating the displacement array didn't save any time (at least not that I could measure). But getting rid of the loop altogether and using what I call the direct approach solved the problem 40 times faster.

  • Nice Video dude

  • could you please demonstrate multi-canonical monte carlo for the same system .... thnx ....

  • @pikuray001

    I have never employed this approach. Sorry, I can't help you.

  • @jakeblanchard how to use Monte carlo integration to simulate Frequency Modulation ? can u help me with a code fragment..plz I have to simulate FM n AM in matlab using Monte Carlo method and I know nothing about matlab! plz help..I m struggling in simulating FM where fm(t)=sin(c*t+kf*trap(cos(m*t. a, b, n) where c=carrier freq, m=message freq k=constant t=time or any method if ur familier to FM
  • @bulllsize

    I don't know anything about AM or FM, but I did find an article that might be of interest:

    MONTE CARLO SIMULATION OF THE PLL FM DEMODULATOR by Pavel Hasan

  • Pr. Blanchard,

    Thank you for this very helpful video

  • Thank you Professor Blanchard for your explanation. I still have a question though.

    I tried the "direct" version in MATLAB. What does the "."

    in "length^3/3." in the last line (displacement=force.*length^3/­3./modulus.inertia;) mean or what is "." referring to, inertia, modulus, diameter or force?

    Thanks so much in advance. I also appreciate answers which are not from Professor Blanchard. :-)

  • @copulapotthoff

    If force and length are vectors, then force*length tries to do vector multiplication, as you learned in linear algebra. If I do force .* length, then it does element by element math. That is, the first element of the force vector times the first element of the length vector and so on. So the "." goes with the operator, not with the variables. There is also ./ for element by element division and .^ for powers.

  • Thank you so much! I wish my professors in Germany were as engaged as you are. Thank you, thank you, thank you!

  • Thanks! Cool stuff.

  • Very helpful

    Thanks!

  • Thank you!

  • Great and useful demo;

    I got one question though, if you want to build a normal distribution instead of uniform, how can you do that?

  • The randn function will return random numbers with a normal distribution.

  • @jakeblanchard Surely not a normal but an uniform distribution?

  • @marcofking

    No. rand returns a uniform distribution, but randn returns a normal distribution (mean=0, standard deviation=1).

  • hi Jake,

    I did not understand your explanation for the introduction of rand(1) while carrying out the simulation. Can you explain me little more clearly. I am still little confused. I am still naive for these simulation subjects.

    thanks,

    Pavan

  • In Matlab, rand(1) returns 1 random number, uniformly distributed between 0 and 1. Something like rand(5,1) will give you a list of 5 random numbers, also uniformly distributed between 0 and 1. rand(5,5) will give you a 5 by 5 array of random numbers.

  • Hello Jake

    How can I infer which is the most influencing variable in this design?

    Regards, Nestor

  • If I interpret your question correctly, you need a sensitivity analysis. Go to wikipedia and search for sensitivity if you want to get an overview of the subject. You can do this with Monte Carlo, but in most situations there are better ways.

  • Nice demo. Is sampling about the diameter done to get an understanding of how the uncertainty in d could effect the estimate? Or is it just purely instructional? I am not a civil so it's not obvious to me. It seems that most diameters can be measured with very good precision and accuracy.

  • I just made up those numbers to demonstrate the technique. Don't take them seriously.

  • This was a very helpful video. I was wondering if you could give me some insight as to how I could use to this model tumor growth. For example, starting with a single cell in a 2D matrix and modeling the growth of an asymmetric tumor

  • I don't know much about tumor growth. It's possible you could do something using cellular automata. You might check out Wolfram's book on the subject, or look it up in widipedia.

  • thank you very much for your reply. I got your opinion.

  • Well, I liked the video. However, I could not understand the relation between the example and the MC simulation. I felt that the example was on the effectiveness of vectorizing the arrays in MATLAB.

    Please correct me if I'm wrong.

    greetings from Istanbul.

  • In my view, this video is a simple demo of MC in Matlab, but it also addresses the speed issue. So I see it as a little of both.

  • professor Blanchard,You are the best!

Loading...
0 / 00Unsaved Playlist Return to active list
    1. Your queue is empty. Add videos to your queue using this button:
      or sign in to load a different list.
    Loading...Loading...Saving...
    • Clear all videos from this list
    • Learn more