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

1 次查看(过去 30 天)
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

采纳的回答

madhan ravi
madhan ravi 2019-4-3
function y = fcn(u)
d = numel(u); % assuming constant blocl is a vector of elements
y = rand(d,9);
  1 个评论
Alex Yande
Alex Yande 2019-4-3
I don't know why i always use difficult and long techniques. It seems that very easy with your solving.
Thx a lot !!
:))

请先登录,再进行评论。

更多回答(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