1

I'm looking to write a script for MATLAB that will import data from a csv file which has a first row containing string headers and the data in each of those columns is either string, date or numeric.

I want to then be able to filter the data in MATLAB according to instances of a particular string and number combination.

Any help appreciated!

Cheers!

2 Answers 2

1

I would recommend you to start with reading MATLAB documentation.

[num,txt,raw] = xlsread('myExample.xlsx')

Reads numeric, text and combined data, so, if your data is combined, then you need the cell array raw. After that, you do whatever you want with your cell array (Additional information is not provided since OP did not provide any specific information about the way the data would be filtered)

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

Comments

0

Try using readtable function in MATLAB. It correctly imports csv file with header and mixed data type.

xlsread was imported by mixed csv file very incorrectly repeating the some rows while maintaining the same total rows.

I got this after searching for a long time: MATLAB Central Question/Answer

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.