ignoring imaginary parts when plotting
33 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
María Jesús
am 13 Jan. 2015
Beantwortet: Star Strider
am 13 Jan. 2015
Hi,
I have a program that estimates some parameters and then plots a curve using those estimates. The parameters are estimated as complex numbers, and I get a warning that the imaginary part is ignored. Exactly what does that mean? I seem to get a different result if I just get it to use the real part.
Thanks!
0 Kommentare
Akzeptierte Antwort
Star Strider
am 13 Jan. 2015
The plot command plots only the real parts of the numbers. If you want to plot all your data, you can either plot the absolute magnitude (use the abs function), or plot the real and imaginary parts separately, either in the same plot or using subplot to plot them on different axes in the same figure window.
It may be worth exploring the reason you are getting complex parameters and results. If you can use lsqcurvefit, consider constraining your parameters. (I do not have the Curve Fitting Toolbox, so if you are using it, I cannot help you.)
0 Kommentare
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Interpolation 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!