Error in using "width" and "fcn" block in SIMULINK

Hi!
I want to use width of matrix in fcn block for the purpose of creating random matrix, but i got an error message. How can i fix it?
Thx!!
untitled.png

 Accepted Answer

function y = fcn(u)
d = numel(u); % assuming constant blocl is a vector of elements
y = rand(d,9);

1 Comment

I don't know why i always use difficult and long techniques. It seems that very easy with your solving.
Thx a lot !!
:))

Sign in to comment.

More Answers (0)

Products

Community Treasure Hunt

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

Start Hunting!