% Clear all data from the Simulation Data Inspector repository
Simulink.sdi.clear
% Load the model and mark signals of interest for streaming
load_system('vdp')
Simulink.sdi.markSignalForStreaming('vdp/x1',1,'on')
Simulink.sdi.markSignalForStreaming('vdp/x2',1,'on')
% Simulate the model with several Mu valuesfor gain = 1:5
gainVal = num2str(gain);
set_param('vdp/Mu','Gain',gainVal)
sim('vdp');
end
Simulink.sdi.getRunCount を使用して x1 信号に許容誤差を割り当て
count = Simulink.sdi.getRunCount;
for a = 1:count
runID = Simulink.sdi.getRunIDByIndex(a);
vdpRun = Simulink.sdi.getRun(runID);
sig = vdpRun.getSignalByIndex(1);
sig.AbsTol = 0.1;
end% Open the Simulation Data Inspector to view your data
Simulink.sdi.view
You can also select a web site from the following list:
How to Get Best Site Performance
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.