Plotting a function...

조회 수: 4 (최근 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