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

2 views (last 30 days)
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

madhan ravi
madhan ravi on 3 Apr 2019
function y = fcn(u)
d = numel(u); % assuming constant blocl is a vector of elements
y = rand(d,9);
  1 Comment
Alex Yande
Alex Yande on 3 Apr 2019
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!