Simulink rapid accelerator only returns tout
1 次查看(过去 30 天)
显示 更早的评论
My model could be compiled succesfully and also the Simulation seemed to run but the only return I got was tout.
My code:
model = 'myModelName';
% build
rapidAccParams = Simulink.BlockDiagram.buildRapidAcceleratorTarget(model);
% Simulation Parameters
paramValStruct.SimulationMode = 'rapid';
paramValStruct.SaveTime = 'on';
paramValStruct.SaveOutput = 'on';
paramValStruct.LoadExternalInput = 'on';
paramValStruct.RapidAcceleratorParameterSets = rapidAccParams;
paramValStruct.RapidAcceleratorUpToDateCheck = 'off';
paramValStruct.ReturnWorkspaceOutputs = 'on';
paramValStruct.RapidAcceleratorUpToDateCheck = 'off';
% run
simOut = sim(model,paramValStruct)
If i run this in 'normal' or 'accel' mode simOut contains both tout and a result struct, but with 'rapid' I only get tout.
Does anybody know what could cause this problem. Any answers would be greatly apreaciated
0 个评论
回答(1 个)
Ankit Bhatnagar
2017-6-28
Hi,
The element 'yout' of the returned object could be just an empty struct as the logging format for the output is set to 'Dataset' by default. Simulation in rapid accelerator mode does not support logging output to a Simulink.SimulationData.Dataset object. You would need to change this to either 'Array','Structure' or 'StructureWithTime' depending on your preference.
Refer the documentation link for further details:
0 个评论
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Acceleration 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!