Save vector to m-file
이전 댓글 표시
Hi. I have a task where I am to create a file called bestPath.m which in turn should include a vector called bestPath. I have searched the net, but no luck. Thanks in advance.
답변 (1개)
Oleg Komarov
2014년 10월 2일
편집: Oleg Komarov
2014년 10월 2일
a = rand(10);
matlab.io.saveVariablesToScript('test.m','a')
Check the content of the .m file with
edit test
Calling test from the command line will evaluate a into the workspace.
댓글 수: 2
Tomas
2014년 10월 2일
Oleg Komarov
2014년 10월 3일
If my answer solves your problem, please accept it.
카테고리
도움말 센터 및 File Exchange에서 Adding custom doc에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!