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 view (last 30 days)
Show older comments
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
0 Comments
Answers (1)
Cris LaPierre
on 10 Nov 2022
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.
See Also
Categories
Find more on Spreadsheets in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!