how to transfer complex results into excel??
Mostra commenti meno recenti
when i am copying my complex results using xlsread command its copying only the real part and not imaginary part.please help
3 Commenti
Hikaru
il 7 Ago 2014
I'm not sure if I understood your question. You want to copy complex numbers from MATLAB to excel, right? If so, why are you using the xlsread command? How big is the array containing the complex numbers?
saba
il 7 Ago 2014
Hikaru
il 7 Ago 2014
xlsread Read Microsoft Excel spreadsheet file.
xlswrite Write to Microsoft Excel spreadsheet file.
Risposte (2)
Azzi Abdelmalek
il 7 Ago 2014
[a,b,c]=xlsread('file.xlsx')
idx=cellfun(@isstr,c)
c(idx)=cellfun(@str2num,c(idx),'un',0)
2 Commenti
saba
il 7 Ago 2014
Azzi Abdelmalek
il 7 Ago 2014
a=[1+i 2 3;4 i 0;-i 2-i 14]
b=arrayfun(@num2str,a,'un',0)
xlswrite('file.xlsx',b)
Hikaru
il 7 Ago 2014
Try this.
Say A is a vector containing the complex numbers.
A = [2+3i;3+i;4-2i]; % example
B = num2str(A);
C = cellstr(B);
xlswrite('filename.xlsx',C)
Categorie
Scopri di più su Spreadsheets in Centro assistenza e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!