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.

回答 (1 件)

Star Strider
Star Strider 2018 年 11 月 8 日

0 投票

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 件のコメント

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

サインインしてコメントする。

タグ

質問済み:

2018 年 11 月 8 日

コメント済み:

2018 年 11 月 8 日

Community Treasure Hunt

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

Start Hunting!

Translated by