[Scilab-users] Scilab : Save all values starting with "vout_"
Quentin Mazué
mazue.quentin at gmail.com
Fri Sep 19 08:35:26 CEST 2014
Hello,
I have a list of variables of different type starting with the same prefix :
'vout_' (for example : vout_time, vout_voltage, vout_current,...)
In Matlab, if I want to save all these values (starting with 'vout_' ) I use
the following command :
save('MySavedValues.mat','vout_*')
In Scilab I didn't find any equivalent syntax. Consequently I use the
following code :
variables2save = [];
variables = who('local');
for i = 1:size(variables,1)
if part(variables(i), 1:5) == "vout_" then
variables2save = [variables2save;variables(i)];
end
end
savematfile('Resultats_Xcos.mat',variables2save,'-v7')
Is there any simplest way to do it?
Thanks in advance
Quentin
--
View this message in context: http://mailinglists.scilab.org/Scilab-Save-all-values-starting-with-vout-tp4031184.html
Sent from the Scilab users - Mailing Lists Archives mailing list archive at Nabble.com.
More information about the users
mailing list