Looking to plot a known, single value variable, against another, single value variable, for a range of figures
7 次查看(过去 30 天)
显示 更早的评论
Hi all,
I'm looking to plot two variables. y, on the x axis, and R1, on the Y.
Using matlab, I have determined a fixed value for y, and one for R1. However, the task is to plot the relationship between the two, for varying values of y.
They are linked by the equation;
R1 = (m*(L*7.22)*(f*cosd(y)))+((m*7.22)*(f*sind(y)));
Despite research, I'm at a bit of a loss. Any help would be invaluable. Apologies for sloppy code, i'm new here :)
Thanks!
0 个评论
回答(1 个)
Jon
2015-10-29
y = 0:1:100; % can change this range to whatever you want; the middle number is the interval
R1 = (m*(L*7.22)*(f*cosd(y)))+((m*7.22)*(f*sind(y)));
plot(y,R1)
Note that since you're not multplying or dividing or powering any of the "y" terms with each other, you can get away without using the . in front of the operators (e.g. .*, ./, .^).
0 个评论
另请参阅
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!