surface plotting with complex function

조회 수: 3 (최근 30일)
AVM
AVM 2020년 1월 19일
댓글: darova 2020년 1월 19일
why with this code the surface ploting does not happen.? Where I am wrong with this code. With this code if write 'plot3(Th,Al,mag', then some 3d image is apperaing. But surface plotting is not happen. Pl help me.
f(theta,alpha)=1i*int(r,phi,0,2*pi); %% f is acomplex function
theta =linspace(0.1,4,20);
alpha =linspace(0.1,4,20);
[Th,Al] = ndgrid(theta, alpha);
F = f(Th,Al);
mag= abs(F);
surf(Th,Al,mag)
%grid on
  댓글 수: 1
darova
darova 2020년 1월 19일
Do you have original formula/expression for f function?

댓글을 달려면 로그인하십시오.

답변 (1개)

Thiago Henrique Gomes Lobato
Thiago Henrique Gomes Lobato 2020년 1월 19일
Maybe you need to add a shading to properly visualize the result?
surf(Th,Al,mag)
shading interp
  댓글 수: 1
AVM
AVM 2020년 1월 19일
But still error is coming. Only 2-D axes are showing and no image. The error are
Error using matlab.graphics.chart.primitive.Surface/set
Invalid parameter/value pair arguments.
Error in prlmatrix (line 36)
surf(Th,Al,F)

댓글을 달려면 로그인하십시오.

카테고리

Help CenterFile Exchange에서 Surface and Mesh Plots에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by