1

I need to import data from a CSV file containing text and numbers, as shown below. csvread and other methods dont seem to be working, is there a way around this?

enter image description here

1
  • 1
    How much of the information do you need? Only the numbers? There is no way to store all that information in a single matrix in MATLAB. The closest you can get is table. You can for instance not include A1:A4 in such a table. Commented May 3, 2016 at 6:28

1 Answer 1

1

I suggest you try readtable:

T = readtable('csv_file.csv',...
    'Range','CA4:F11',...
    'ReadVariableNames',true)

I'm not sure if it will be able to handle % TYPE in A4, but you might have to delete that cell for this to work.

Note: You have to save this as a .xls, .xlsx, .xlsm, .xltx, or .xltm-file for this to work. It's easy to import a csv file into excel and save it as an xlsx-file, so that shouldn't be a problem if you have MS Office.

It's of course possible to do this using the csv-file directly, but that's a bit more messy.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.