Using csvread()
should help you here. It does support reading in complex data if your column data is in complex format.
Check the MATLAB documentation: http://www.mathworks.com/help/matlab/ref/csvread.html and look under the Algorithms heading.
Question
I have a .csv
file that has a column of data being complex. When I use data = load(file_name)
, the imaginary parts of that column are all discarded!
How may I import them into MATLAB without losing my imaginary part?
Solution
Using csvread()
should help you here. It does support reading in complex data if your column data is in complex format.
Check the MATLAB documentation: http://www.mathworks.com/help/matlab/ref/csvread.html and look under the Algorithms heading.