Level 2 Matlab S-Function

Hello,
I am working with a Matlab S-Function and I have problem with the OutputPort vector size.
The following error is printed : ''attempt to assign a vector of width 4 to a vector of width 0 ''
The only way I have is the following synthaxe : "block.OutputPort(1).CurrentDimensions = block.InputPort(1).CurrentDimensions"
But my Input port has a width of 1.
I want to make OutputPort vector that has width of 4 independantly from the input. Can someone help me to find a solution ?

Answers (0)

Asked:

on 4 Mar 2021

Community Treasure Hunt

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

Start Hunting!