Looking to plot a known, single value variable, against another, single value variable, for a range of figures
4 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
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 Kommentare
Antworten (1)
Jon
am 29 Okt. 2015
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 Kommentare
Siehe auch
Kategorien
Mehr zu Language Fundamentals finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!