Struggling to plot a complex function using the mesh command.
조회 수: 17 (최근 30일)
이전 댓글 표시
Hi,
I need help with making a complex mesh of a function. The function is simply sin(a+a*pi/2) but a is a complex number.
I want to make the domain from -360i to 360i in the complex axis and -360 to 360 in the real axis. With a step of 1 in each. Meaing I will have 721x721 resutls to plot.
upper = 360;
dx = 1;
x = -upper:dx:upper;
z = zeros(length(x),length(x));
y = zeros(1, length(x));
for i = 1:length(x)
for count = 1:length(x)
z(i,count) = complex(x(i),x(count));
end
end
y = sind(z+z.*pi()./2);
Above is the code I used to get the results for the function and stored it in y. x is every point along the real axis, and z is everypoint on the real-imagainary plane.
Now I'm not sure how I should plot this using the mesh function. Of course there is the first problem that plotting this would require 4 dmentions; but I'm happy to take the absolute value/real value/ complex value to limit the answer to 3d. But, I'm not sure how to polt any of these graphs, and ideal plot them all at the same time.
mesh(x , x*j ? , ?)
Thank you in advanced.
댓글 수: 2
KSSV
2020년 7월 23일
The function has a, and a values are defined......how you can take values from -2*pi to 2*pi. ?
채택된 답변
추가 답변 (0개)
참고 항목
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!