how to get complex plot img and real
Mostrar comentarios más antiguos

2 comentarios
Rik
el 1 de Abr. de 2021
What is your question?
Do you want to know how to write an anonymous? Do you want to know how to extract the real and imaginary components of complex numbers? Do you want to know how to plot data?
Priyank Chauhan
el 1 de Abr. de 2021
Respuestas (1)
KSSV
el 1 de Abr. de 2021
a = rand(10,1)+1i*rand(10,1) ; % complex number for demo
figure
plot(a) ; % this will plot real part vs complex part
The above is simliar to
plot(real(a),imag(a))
6 comentarios
Priyank Chauhan
el 1 de Abr. de 2021
Rik
el 1 de Abr. de 2021
The rand was only to generate date to make the example run. You need to plug in your own data.
KSSV
el 1 de Abr. de 2021
For finding absolute read about abs.
a = rand(10,1)+1i*rand(10,1) ; % complex number for demo
plot(abs(a))
Priyank Chauhan
el 1 de Abr. de 2021
Priyank Chauhan
el 1 de Abr. de 2021
Rik
el 1 de Abr. de 2021
You can find guidelines for posting homework on this forum here. If you have trouble with Matlab basics you may consider doing the Onramp tutorial (which is provided for free by Mathworks). If your main issue is with understanding the underlying concept, you may consider re-reading the material you teacher provided and ask them for further clarification.
Categorías
Más información sobre 2-D and 3-D Plots en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
