Why does matlab rename my simulink logsout file?
1 view (last 30 days)
Show older comments
Hello,
I would like to run multiple simulation with batchsim. The following code should setup the required simulation input objects in a for loop. In the newFileName is stored the output mat file names. Someting like {'simulationfile_a.mat', 'simulationfile_b.mat', 'simulationfile_c.mat'}
After running the simulation the i got .mat files with name like simulationfile_a_1.mat, simulationfile_b_2.mat, simulationfile_c_3.mat.
Why?
How to rename the files to the original?
This this renaming only happens with batchsim. With parsim it was ok.
%Setup SI
in(i) = Simulink.SimulationInput(model);
in(i) = in(i).setModelParameter(...
'StopTime', num2str(stop_time.sim_end),...
'LoggingFileName', newFileName{i},...
'SignalLogging', 'on',...
'LoggingToFile', 'on',...
'SaveFormat', 'Dataset',...
'SaveTime', 'off',...
'SaveState', 'off',...
'SaveOutput', 'off',...
'SaveFinalState', 'off',..
'DSMLogging', 'off',...
'ReturnWorkspaceOutputs', 'on',...
'Profile', 'off',...
'InspectSignalLogs', 'off',...
'DatasetSignalFormat', 'timeseries');
%run batch
simJob = batchsim(myCluster, in, ...
'Pool', min(myCluster.NumWorkers-1, length(newFileName)),...
'AutoAddClientPath', false,...
'ManageDependencies', 'off',...
'AttachedFiles',filesToAttach,...
'ShowProgress','on',...
'TransferBaseWorkspaceVariables', 'off',...
'CleanupFcn', @Simulink.sdi.clear);
0 Comments
Answers (0)
See Also
Categories
Find more on Programmatic Model Editing in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!