I have file with size= 2728, 5. I use writematrix function to sale file in Excel file. If I read saveld file, it size becomes 2728, 2728.. What is wring?

1 次查看(过去 30 天)
TensCoeff=[Tension,ACoef];
STC=size(TensCoeff)
[file,path] = uigetfile('.xlsx');
File=strcat(path,file)
writematrix(TensCoeff,File);
RAA = readmatrix(File);
SRA=size(RAA)
++++++++++++++
Result:
STC =
2728 5
File =
'E:\AMYFILES\WOUNDING\WEAVSOFT_1\ACoeff.xlsx'
SRA =
2728 2728

回答(1 个)

Cris LaPierre
Cris LaPierre 2022-11-10
Your syntax means the data is being writting to an existing spreadsheet, which seems to alreay have some data in it.
readmatrix does not flush the contents of the file before writing. It is likely that at some point, you wrote your data to the file transposed. You should open the file and delete the unnecessary data.

标签

Community Treasure Hunt

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

Start Hunting!

Translated by