Struggling to plot a complex function using the mesh command.
17 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
Wojciech Kalinowski
el 23 de Jul. de 2020
Comentada: Wojciech Kalinowski
el 23 de Jul. de 2020
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 comentarios
KSSV
el 23 de Jul. de 2020
The function has a, and a values are defined......how you can take values from -2*pi to 2*pi. ?
Respuesta aceptada
Más respuestas (0)
Ver también
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!