Plotting a function...

5 Ansichten (letzte 30 Tage)
Mark
Mark am 20 Feb. 2011
I have the following function that I would like to plot.
Gamma = atand((Y)/(X));
Whats the best way to preform this task. Y and X will vary from 0 to 40.
Thanks,

Akzeptierte Antwort

Walter Roberson
Walter Roberson am 20 Feb. 2011
[X,Y] = meshgrid(0:.1:40, 0:.1,40);
surf(X, Y, atand(Y ./ X));
  8 Kommentare
Matt Tearle
Matt Tearle am 20 Feb. 2011
plot3 is for a curve in space - for each x there's one corresponding y and z, as opposed to a surface where there's a whole range of y values for each x (and vice versa)
Paulo Silva
Paulo Silva am 20 Feb. 2011
thank you Walter and Matt for sharing your knowledge :)

Melden Sie sich an, um zu kommentieren.

Weitere Antworten (2)

Matt Tearle
Matt Tearle am 20 Feb. 2011
[x,y] = meshgrid(0:0.5:40);
gam = atand(y./x);
surf(x,y,gam,'linestyle','none')

Mark
Mark am 20 Feb. 2011
Thanks for the help

Kategorien

Mehr zu Mathematics finden Sie in Help Center und File Exchange

Tags

Produkte

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by