Save vector to m-file
Mostra commenti meno recenti
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.
Risposte (1)
Oleg Komarov
il 2 Ott 2014
Modificato: Oleg Komarov
il 2 Ott 2014
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 Commenti
Tomas
il 2 Ott 2014
Oleg Komarov
il 3 Ott 2014
If my answer solves your problem, please accept it.
Categorie
Scopri di più su Adding custom doc in Centro assistenza e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!