Help reading data from CSV file?

I have code for data in csv file but do not know how to import and run data through the code.

Answers (1)

Star Strider
Star Strider on 8 Nov 2018
Without knowing more, your best option (if you have R2013b or later) is to use the readtable (link) function.
For details on using table data types, see Access Data in a Table (link).

7 Comments

I have a set of data in a csv file and I have a code for it but bringing them together is my problem. I could sit and do it all manually but not ideal
Use readtable to import your data. It is then straightforward, using the table2array (link) function to bring the data into your workspace as a numeric data matrix, assuming your data are all numeric.
Beyond that, I have no idea what you are doing.
I have no idea either :D I have basic knowledge with MATLAB coding but have never had to import data before. Readtable etc is new language to me
I have 14 different variables in my table such as age, gender etc. I need to run all the data through the code for analysis. Basically do not have a clue.
Unfortunately, that makes two of us!
I have absolutely no idea what you want to do.
I have a set of data I need to run through code but I don't know how to put it through the code without doing it manually for each individual. Does that make sense?
For example, if person is over 20 code will say this is true. If not over 20 this is false. Display etc

Sign in to comment.

Tags

Asked:

on 8 Nov 2018

Commented:

on 8 Nov 2018

Community Treasure Hunt

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

Start Hunting!