Info

Questa domanda è chiusa. Riaprila per modificarla o per rispondere.

Error when propagating variable length signal

2 visualizzazioni (ultimi 30 giorni)
Andrew Poissant
Andrew Poissant il 9 Lug 2018
Chiuso: MATLAB Answer Bot il 20 Ago 2021
I have a simulink model that has an if action subsystem, and a matlab function block within that subsystem. The matlab function block outputs a variable of changing length, out1. The matrix size of out1 depends on sizes of other variables, which are not known until the if action subsystem block is activated during simulation. I declared out1 as variable size by calling coder.varsize('out1') in the matlab function block, and I specified the upper bound of the out1 and clicked the variable size check-box in the model explorer for out1. However, when I run the simulation I get the following error:
"The output signal sizes of block 'UAV_SIM_MAIN/GIHM1/Triggered Subsystem1/engine out/Gliding' depend on the input signal values. However, the subsystem that contains this block is set to 'Propagate sizes of variable-size signals only when enabling'. Consider placing this block outside subsystems with this parameter setting or changing the parameter 'Propagate sizes of variable-size signals' for 'UAV_SIM_MAIN/GIHM1/Triggered Subsystem1/engine out/Action Port' to 'During execution'."
How do I change the subsystem's parameter 'propagate sizes of variable-size signals' to 'during execution'? I can't take the Matlab function block outside of the subsystem like the error message suggests.

Risposte (0)

Questa domanda è chiusa.

Community Treasure Hunt

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

Start Hunting!

Translated by