Plotting a complex function with function in real and imag part
2 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Wei Chuang Lee
am 16 Apr. 2020
Kommentiert: Wei Chuang Lee
am 23 Apr. 2020
I am abit lost while trying to plot a complex function when it comes to a function that with a function in real and imag part
Let say the f=x+i*y, where f,x,y are functions of w, and i is an imaginary number.
the range of w is
w=0:0.1:50;
I tried to use
plot(w,f)
and matlab told me that either real part/ imag part has been ignored in the graph
and I tried to use
plot(w,real(f),imag(f))
and system shows error...
I am confused how can I plot this equation with defining the w and with the range of w from 0~50... and how can I plot the graph correctly...
I do appreciate your help in advance!
0 Kommentare
Akzeptierte Antwort
Mehmed Saad
am 16 Apr. 2020
figure,plot(w,real(f)) hold on,plot(w,imag(f))
or
figure,plot(w,[real(x);imag(x)])
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Image Segmentation and Analysis finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!