Trouble with From Workspace Simulink Block

4 次查看(过去 30 天)
I'm using a From WorkSpace Simulink block in R2013 and I keep getting this error even though I created the structure with time and signals.values fields.
Invalid structure-format variable specified as workspace input in 'TestVICONcode/From Workspace'. If the input signal is a bus signal, the variable must be a structure of MATLAB timeseries objects. Otherwise, the variable must include 'time' and 'signals' field, and the 'signals' field must be a structure with a 'values' fields.
Here is the code I used to create the structure I want to input into my Simulink model.
signals = struct('values', [1, 2; 2, 4; 3, 6],'dimensions', [2 1]);
Output_GetTimecode = struct('signals', signals);
Output_GetTimecode = struct('time', [0; 1; 3] );

回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Sources 的更多信息

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by