An introduction to basic “for” loop logic and some tips to make clear, visually appealing plots easily.
An introduction to basic “for” loop logic and some tips to make clear, visually appealing plots easily.
Author: Numerical Methods ChE McMaster
Send this to a friend
+Numerical Methods ChE McMaster I just wanted to let you know that I have had a very hard time these last years trying to learn matlab basics and your videos (which I just recently discovered) have really helped me and inspired me to keep learning matlab. I really enjoy your videos! Thank you so much!!!!
amazing. thanks a lot
How would I create a loop that would plot a graph with an unknown max time, but once a value becomes 0 the plotting of the graph stops.
Thanks.
Is that a Dark Souls wallpaper i see? ^^
very good tutorial. thank you so much. it is really very helpful
thanks for the nice explanation.. also can u please provide a tutorial video with an equation of the form where equation is dependent on two variables, say like velocity is dependent on both position ‘x’ and time ‘t’ and both of which are in summation form??
@05:08, Can you please tell me why didn’t you put brackets for 0:0.01:10?
bro thanks a lot……………
very very helpful, thx!
OMG you are a life saver dude
very good
Thank you so much
thanks! now it seems easy (:
I don’t know why but the second method makes more sense to me.
These videos are the most understandable ones among all the matlab video tutorials that i have seen uptil now! please upload more videos. the teaching style is very effective.
+Numerical Methods ChE McMaster is there any ways to simplify the steps used to plot the graphs?maybe using a loop?
And i have some problems here, it just a simple problem regarding the column and row of the theta in LINE 34. For the function you used theta(1,:) = the functions, when i run it it will be 4×1001 matrix and it not the same as you which is 1001×4 matrix. I need to change the codes back to theta (:,1) to get the same result 1001×4 as you get. Can you explain this?
Very good!
Really Very Informative……….You have done Great Job.
Good video boss but I prefer if you dont use the word “garbage “for mathematics and physics. This is not garbage. Reality shows are garbage.
Thank you, very helpful video.
NICE!
This is by far the best youtube channel I have found for learning MATLAB! My teacher, as of now, does not “teach” anything and I have been very frustrated and found myself falling behind. Finding these have helped me catch back up with where everyone should be in class now! Thank you so much for such a great teaching style which I am able to fully understand and benefit from! These are a life saver! Please, keep it up!
very good
Thank you so much for your simplified explanation. I learned different things from this lesson.
Studying for finals and this was SOOO HELPFUL!! THANK YOU!!
Thank you so so so much. You helped me understand for loop.
video was very helpful but there is a small confusion, i think if A(x,y) is a matrix then x represents the number of rows and y represents the number of columns but you are saying in a reverse manner which is confusing us.
so in my class right now I have to plot the eigenvalues on a complex plane for varying values of k in my A matrix which is:
c = 2;
b = -.1;
A = [0 1; -c-k1 -b-k2];
eig(A);
I created a for loop:
k1 = 0:0.01:10;
for i = 1:length(k1)
k1(i);
end
I just don’t know exactly as to how to get the varying eigenvalues to output
(I know that I have to define k2 as well) using the for loop and then plot them…please help out if you can!
Amazing Job. Well done
The natural numbers less than 10 that are multiples of 4 or 9 are 4, 8 and 9. Their sum is 21.Find the sum of all the multiples of 4 or 9 less than 1000. How would you find the matlab code for such a question? please help.