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.

Respuestas (1)

Star Strider
Star Strider el 8 de Nov. de 2018

0 votos

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 comentarios

Kristine McKay
Kristine McKay el 8 de Nov. de 2018
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
Star Strider
Star Strider el 8 de Nov. de 2018
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.
Kristine McKay
Kristine McKay el 8 de Nov. de 2018
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
Kristine McKay
Kristine McKay el 8 de Nov. de 2018
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.
Star Strider
Star Strider el 8 de Nov. de 2018
Unfortunately, that makes two of us!
I have absolutely no idea what you want to do.
Kristine McKay
Kristine McKay el 8 de Nov. de 2018
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?
Kristine McKay
Kristine McKay el 8 de Nov. de 2018
For example, if person is over 20 code will say this is true. If not over 20 this is false. Display etc

Iniciar sesión para comentar.

Etiquetas

Preguntada:

el 8 de Nov. de 2018

Comentada:

el 8 de Nov. de 2018

Community Treasure Hunt

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

Start Hunting!

Translated by