Error file output dimensions
显示 更早的评论
I am trying to create an Adaptive Model Predictive control to hold a pendulum at a certain angle (theta), assuming a rotory actuator at the pivot of the pendulum and the mass being connected using a rigid massless rod. I wrote the following file to give the plant dynamics
function y = fcn(u,T)
%% u(1) : Angular Position (rad) u(2) : Angular rate (rad/s)
%T is the applied torque(N/m)
y = zeros([2 1]);
y(1) = u(2); % Angular rate
y(2) = 9.81/0.5*sin(u(1))-T/3/0.5; %Angular Acceleration
Hence the output of the file should be a [2 x 1] matrix, but when I ran the following command
>> set_param(bdroot,'ShowLineDimensions','on')
It showed the line dimension as 2(scalar). What is going wrong here? I fail to understand.
I have attached the Simulink file along with the question.
4 个评论
Walter Roberson
2020-2-24
I suspect that Simulink drops all trailing 1 in the shape.
Dhruv Thakkar
2020-2-25
weiwei cao
2020-4-2
编辑:weiwei cao
2020-4-2
I met the same error, so how did you get rid of it?
Thanks a lot~
Dhruv Thakkar
2020-4-5
采纳的回答
更多回答(0 个)
类别
在 帮助中心 和 File Exchange 中查找有关 Controller Creation 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!