how to plot the 3d graph
이전 댓글 표시
dgh:= 0.09954;
Delta:=-0.68429;
sx:=-0.01098;
sy:= 0.05126;
Esup:=sx*x+sy*y+dgh*((x^2+y^2)/2+Delta*(x^2-y^2)/2)^(1/2);
Einf:=sx*x+sy*y-dgh*((x^2+y^2)/2+Delta*(x^2-y^2)/2)^(1/2);
how to plot the graphs of the two functions in the same plot.
댓글 수: 2
Walter Roberson
2016년 2월 9일
Please confirm that you want to plot within a MuPad notebook and not within MATLAB.
Sarah Palfreyman
2016년 3월 7일
Have you seen the fplot family of functions in R2016a?
답변 (1개)
John BG
2016년 3월 7일
Hi Akshaya
the straight way to visualize the function boundaries is, for Esup
dgh= 0.09954;
Delta=-0.68429;
sx=-0.01098;
sy= 0.05126;
x=[-20:1:20];y=[-20:1:20]
[X,Y]=meshgrid(x,y)
Esup=sx*X+sy*Y+dgh*(abs((X.^2+Y.^2)/2+Delta*(X.^2-Y.^2)/2)).^.5
figure(1);surf(X,Y,Esup)

and Einf:
figure(2);surf(X,Y,Einf)

I had to add the abs() otherwise the boundaries showed complex values when attempting to solve sqrt of negative values.
To plot both boundaries in same graph use command hold:
figure(1);hold all;surf(X,Y,Einf)

If you find this answer of any help solving your question, please click on the thumbs-up vote link,
thanks in advance
John
카테고리
도움말 센터 및 File Exchange에서 Analysis에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!