problem to plot graph
Info
This question is closed. Reopen it to edit or answer.
Answers (1)
Microsoft Excel does not support complex numbers by default. You need to enable the Analysis Toolpak in order to create complex numbers -- without that, anything you enter in complex form is just considered to be a text string.
I see that writetable() from MATLAB drops complex components as it writes, so it is not possible to just use the work-around of writetable() to get complex data into a form that can be read back.
I happen to be using Excel for Mac 2011. It turns out that the Analysis add-on is not available for that; they refer me to the third-party xlstat package, which would be a minimum of $US295 dollars per year (I do not qualify as academic.) And that is minimum -- there are premium add-ons and it is not clear which of those would be needed to support complex numbers.
I would suggest to you that you simply make the complex component a third column in the xlsx file, and put the two columns back together again after reading in the data, by using
U = complex(a(:,2),a(:,3))
This question is closed.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!