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

조회 수: 1 (최근 30일)
Ngoc
Ngoc 2013년 12월 5일
답변: sixwwwwww 2013년 12월 5일
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

답변 (1개)

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

카테고리

Help CenterFile Exchange에서 Large Files and Big Data에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by