How can I change an xlsx file to a mat file?

I have a long column in a form of a .xlsx file and I am trying to convert to a .mat file in order to make a signal. what is the best way to go about this?

답변 (2개)

Hank
Hank 2020년 6월 1일

1 개 추천

Try using
A = readmatrix('spreadsheet.xlsx')
to get the data. See the documentation for help on that. Check that the data loaded correctly.
If you need to save it as a mat file
save('data.mat','A')

댓글 수: 2

I tried that, however the numbers in my matrix are small the elements in matrix A are seen as NaN. Do you know how to bypass that?
Hank
Hank 2020년 6월 3일
is the data numeric? Can you share and example of the data, or the file?

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

Son Pham
Son Pham 2024년 6월 21일

0 개 추천

I think using Import tool is the quickest way.
readmatrix as Hank mention is also useful Read matrix from file - MATLAB readmatrix (mathworks.com)

카테고리

질문:

2020년 6월 1일

답변:

2024년 6월 21일

Community Treasure Hunt

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

Start Hunting!

Translated by