subscript that is out of range?
5 views (last 30 days)
Show older comments
I tried to simulate matrix equations with simulink but "subscript is out of range" error display. Anyone pls fix it.
attachment : simulink file
0 Comments
Accepted Answer
stozaki
on 19 Sep 2020
Hello Rajeev,
The variable "P" is undefined in your Fcn block.
Define the value of the variable "P".
Regards,
stozaki
2 Comments
stozaki
on 21 Sep 2020
Hi,
Is it the same error? Isn't it a different error message?
I seem to have the wrong number of elements in your Fcn block. Since the output of the Demux block is scalar, I don't think u (2) or u (3) can be used.
I think the input of the Fcn block can remain a vector. I have attached a reference example.
stozaki
More Answers (0)
See Also
Categories
Find more on Simulink Functions in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!