How to save complex number data in single excel file with multiple tabs?
Afficher commentaires plus anciens
Greetings
I have a following data
2.0950 + 2.0840i
2.1150 + 2.0950i
2.0910 + 2.0990i
2.0950 + 2.1060i
2.1240 + 2.1000i
2.1080 + 2.1060i
2.0990 + 2.1000i
2.1090 + 2.1010i
2.1150 + 2.1070i
2.1040 + 2.0970i
2.1040 + 2.0970i
2.1210 + 2.0920i
2.1170 + 2.0880i
2.1200 + 2.0890i
2.0990 + 2.0830i
2.0980 + 2.0930i
2.0940 + 2.1020i
2.0960 + 2.0960i
2.1040 + 2.1020i
2.1010 + 2.0920i
2.1060 + 2.0820i
2.1130 + 2.0860i
2.1130 + 2.0930i
2.1060 + 2.0920i
2.0930 + 2.0900i
2.0890 + 2.0900i
2.1090 + 2.0860i
2.1210 + 2.0920i
2.1060 + 2.0900i
2.0980 + 2.0920i
3 groups with 10 complex number
I want to save each group data seperately in different tab(in the above case, we will get three tabs)
below is the brief structure of original codes
clc;
clear;
while i:0<3
[real, imag] = some_external_api_function_dat_brings_out_complex_number();
data = complex(real, imag)
end
and I have tried the below
clc;
clear;
groupnumber=3
filename = 'data.xlsx';
while i:1<=groupnumber
[real, imag] = some_external_api_function_dat_brings_out_complex_number(); % bring out the data
char = strcat('sheet',i)
xlswrite(filename, real, strcat);
xlswrite(filename, imag, strcat);
end
but it isn`t going well
how to solve the above problem
Réponse acceptée
Plus de réponses (1)
Mathieu NOE
le 6 Oct 2020
0 votes
Hi
SEE ATTACHEMENT
this should work. I corrected your code using also some info from another submission :
hope it helps
cheers
Catégories
En savoir plus sur Axis Labels dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!