필터 지우기
필터 지우기

save matrix in excel and keeping the configuration (. and ,)

조회 수: 2 (최근 30일)
Mohamed Abushaqra
Mohamed Abushaqra 2022년 7월 11일
답변: Amanjeet Pani 2022년 7월 13일
Hello,
I am trying to save a matrix from MATLAB as CSV (or excel) however I am facing the following problem..
The number 0.98 (matlab matrix) is saved as 0.98 (CSV table) -> correct
The number 1.05 (matlab matrix) is saved as 105 (CSV table) -> Wrong
The number 1.08679 (matlab matrix) is saved as 108.679 (CSV table) -> Wrong
I am atatching the two imagens from MATLAB and CSV.
  댓글 수: 2
Emmanuel J Rodriguez
Emmanuel J Rodriguez 2022년 7월 11일
Hi! I'd like to take a closer look and see if I may be of help. Can you share the code?
Stephen23
Stephen23 2022년 7월 11일
By default MS Excel aligns text of the left and aligns numbers on the right... which tell us that (if you haven't changed the alignment) something is really messed up with how MS Excel interprets that data file.
However because you did not upload your data (both MAT file and CSV file) by clicking the paperclip button there is not much we can do.

댓글을 달려면 로그인하십시오.

답변 (1개)

Amanjeet Pani
Amanjeet Pani 2022년 7월 13일
you can run this command using matlab
writematrix(<matrix_name>,'filename.xls')
Aditionally you can go through this documentation page of writematrix() of matlab for more details if any.

카테고리

Help CenterFile Exchange에서 Spreadsheets에 대해 자세히 알아보기

제품


릴리스

R2022a

Community Treasure Hunt

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

Start Hunting!

Translated by