Plotting a function...

5 次查看(过去 30 天)
Mark
Mark 2011-2-20
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,

采纳的回答

Walter Roberson
Walter Roberson 2011-2-20
[X,Y] = meshgrid(0:.1:40, 0:.1,40);
surf(X, Y, atand(Y ./ X));
  8 个评论
Matt Tearle
Matt Tearle 2011-2-20
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 2011-2-20
thank you Walter and Matt for sharing your knowledge :)

请先登录,再进行评论。

更多回答(2 个)

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

Mark
Mark 2011-2-20
Thanks for the help

类别

Help CenterFile Exchange 中查找有关 Mathematics 的更多信息

标签

产品

Community Treasure Hunt

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

Start Hunting!

Translated by