Info

This question is closed. Reopen it to edit or answer.

Importing data and text from a file

1 view (last 30 days)
Sven Svensson
Sven Svensson on 20 Sep 2014
Closed: MATLAB Answer Bot on 20 Aug 2021
I am trying to adapt the first line of a script (copied below) that was compatible on my old PC. Since I am no longer able to use xlsread with my new MAC OS X, I am looking for an alternative way to reach the same goal, so both 'data' and 'text' could be imported separately. The next step would be to use the data for calculations and linear regressions.
[data,text] = xlsread('filename.xlsx'); %need to adapt this line??
[data,i] = sortrows(data,[1]);
text=text(2:end,:);
text=text(i,:);
  1 Comment
dpb
dpb on 20 Sep 2014
According to my doc's looks like 'basic' mode should read a .xlsx file with no additional arguments but to read the given worksheet? Does it not function that way now?
Other than that, knowing nothing of Mac, would seem need to store in some other format than Excel or use a 3rd party reader or somesuch???

Answers (0)

Community Treasure Hunt

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

Start Hunting!