generating a usable Matlab variable from csv file

1 回表示 (過去 30 日間)
Daniel
Daniel 2014 年 8 月 28 日
コメント済み: Daniel 2014 年 8 月 28 日
Is there anything along the lines of import wizard that can generate a variable, which you can then place in a matlab script? For example if you had a column in your csv file called "test" with row values of 1, 2, 3, matlab would create the following
test = [1 2 3];
which you could then obvioulsy use in your matlab code.
Or is something I would probably have to write a script myself to achieve?
  2 件のコメント
José-Luis
José-Luis 2014 年 8 月 28 日
Depends on how the csv file looks like
Daniel
Daniel 2014 年 8 月 28 日
Right...I guess I was hoping you could use either cell arrays or just straight vectors depending on the data type it encounters

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

採用された回答

Sean de Wolski
Sean de Wolski 2014 年 8 月 28 日
In R2014a, we introduced matlab.io.saveVariablesToScript which does this.
  1 件のコメント
Daniel
Daniel 2014 年 8 月 28 日
looks like I'll have to upgrade. Thank you.

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

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeData Import from MATLAB についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by