generating a usable Matlab variable from csv file

1 次查看(过去 30 天)
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 个评论
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.

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Data Import from MATLAB 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by