generating a usable Matlab variable from csv file

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

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일

0 개 추천

In R2014a, we introduced matlab.io.saveVariablesToScript which does this.

추가 답변 (0개)

카테고리

도움말 센터File Exchange에서 MATLAB에 대해 자세히 알아보기

질문:

2014년 8월 28일

댓글:

2014년 8월 28일

Community Treasure Hunt

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

Start Hunting!

Translated by