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??
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.
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!
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!
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.
@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
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. :-)
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.
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.
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.
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.
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.
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.
Good job!
jarios1990 1 month ago
wft is dis shitz?
mjsupafly 2 months ago
sir
i am looking for a similar presentation on genetic algorithm. would be very happy if you could upload a video on that topic.
MultiBhalo 2 months ago
This has been flagged as spam show
SIMPLY..,COPY:.;&;;,PASTE,:,
WWW.NEWSTREAMMOVIES.TK
SIMPLY'..COPY.';&.'`PASTE``.
DerwinHawkins 8 months ago
where is the code?! plz! if it is the tutorial code needs to be included!
repsieximo 10 months ago
@repsieximo
You can find the code here:
blanchard "dot" ep "dot" wisc "dot" edu/PublicMatlab/index.html#Monte
jakeblanchard 10 months ago 3
@jakeblanchard
By the way, this isn't exactly the same code, but it's similar.
jakeblanchard 10 months ago
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 11 months ago
@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.
jakeblanchard 11 months ago
What I needed! Thanks for sharing.
rezarezaii 1 year ago
This has been flagged as spam show
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!
joimko2 1 year ago
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!
joimko2 1 year ago
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 1 year ago
@nbsr1
Good point. This is always a good practice and sometimes I'm lazy in this regard.
jakeblanchard 1 year ago
@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.
jakeblanchard 1 year ago
Nice Video dude
pavan2deepu 1 year ago
could you please demonstrate multi-canonical monte carlo for the same system .... thnx ....
pikuray001 1 year ago
@pikuray001
I have never employed this approach. Sorry, I can't help you.
jakeblanchard 1 year ago
bulllsize 1 year ago
@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
jakeblanchard 1 year ago
Pr. Blanchard,
Thank you for this very helpful video
sebatheking 1 year ago
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 1 year ago
@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.
jakeblanchard 1 year ago
Thank you so much! I wish my professors in Germany were as engaged as you are. Thank you, thank you, thank you!
copulapotthoff 1 year ago
Thanks! Cool stuff.
MrShafti 2 years ago
Very helpful
Thanks!
neeroro 2 years ago
Thank you!
paperman8888 2 years ago
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?
kkmm222159 2 years ago
The randn function will return random numbers with a normal distribution.
jakeblanchard 2 years ago
@jakeblanchard Surely not a normal but an uniform distribution?
marcofking 1 year ago
@marcofking
No. rand returns a uniform distribution, but randn returns a normal distribution (mean=0, standard deviation=1).
jakeblanchard 1 year ago
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
saipavangt 2 years ago
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.
jakeblanchard 2 years ago
Hello Jake
How can I infer which is the most influencing variable in this design?
Regards, Nestor
nrvallejo 2 years ago
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.
jakeblanchard 2 years ago
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.
cpabrego 3 years ago
I just made up those numbers to demonstrate the technique. Don't take them seriously.
jakeblanchard 3 years ago
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
vaish3827 3 years ago
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.
jakeblanchard 3 years ago
thank you very much for your reply. I got your opinion.
ahmetanildindar 3 years ago
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.
ahmetanildindar 3 years ago
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.
jakeblanchard 3 years ago
professor Blanchard,You are the best!
CHatPhilly 3 years ago