How to read complex number from a *.csv file?

1 visualizzazione (ultimi 30 giorni)
Ngoc
Ngoc il 5 Dic 2013
Risposto: sixwwwwww il 5 Dic 2013
Hi,
I have to import a data set from a csv file but I cannot find any way to import the complex number from the file to Matlab to do the data processing. I try to search on the internet but no solutions are helpful. I tried importdata, csvread, textread,... but they didn't work. Can anyone show me how to solve this problem? I attached part of my csv file below. I really need help. Thanks

Risposte (1)

sixwwwwww
sixwwwwww il 5 Dic 2013
you can do it as follows:
[num, str, raw] = xlsread('filename.csv');
a = str2num(cell2mat(raw));

Categorie

Scopri di più su Large Files and Big Data in Help Center e File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by