필터 지우기
필터 지우기

Outputting 3D Arrays to Excel for plotting

조회 수: 1 (최근 30일)
Gibliano
Gibliano 2012년 8월 2일
I am doing a Simulation and I have five outputs which I want to export to Excel under the following headings
Frequency - 5 in total Real_inc Imag_inc Amp_inc Phase
I have the following code
for f=1:freqs
fileID = fopen('FDTD.xls','w');
fprintf ('%d\n\n\n Input Pulse : %8.4f %8.4f %8.4f %8.4f %7.2\n\n\n',f,real_inc(f),imag_inc(f),amp_inc(f),(180/pi)*phase_inc(f));
fclose(fileID);
end
The problem is that the outputs are in 3D format and I want to arrange them so that for a particular frequency, I have all the other values listed under. I am hoping someone might be able to help

채택된 답변

Babak
Babak 2012년 8월 2일
1- I think the dimension depends on the dimension of your parameters, i.e. f, real_inc,...
2- try using this format:
fprintf(fileID,formatSpec,A1,...,An)

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Data Import from MATLAB에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by