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

27 visualizzazioni (ultimi 30 giorni)
Yasmine Abdennadher
Yasmine Abdennadher il 1 Giu 2020
Risposto: Son il 21 Giu 2024
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?

Risposte (2)

Hank
Hank il 1 Giu 2020
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 Commenti
Yasmine Abdennadher
Yasmine Abdennadher il 1 Giu 2020
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 il 3 Giu 2020
is the data numeric? Can you share and example of the data, or the file?

Accedi per commentare.


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

Categorie

Scopri di più su Data Import from MATLAB in Help Center e File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by