I have a problem with this code which implements an nmpc controller for trajectory tracking a quadrotor especially this line [uk,nloptions,info] = nlmpcmove(​nlmpcobj,x​k,last

2 views (last 30 days)
  2 Comments
Aquatris
Aquatris on 29 Feb 2024
Depending on matlab version, this way of structure creation might not work
nlmpcobj.MV = struct( ...
Min={0;0;0;0}, ...
Max={10;1.625;1.625;1.625});
disp(nlmpcobj.MV)
4×1 struct array with fields: Min Max
Instead you might need something like
nlmpcobj.MV = struct( ...
'Min',{0;0;0;0}, ...
'max', {10;1.625;1.625;1.625});
disp(nlmpcobj.MV)
4×1 struct array with fields: Min max

Sign in to comment.

Answers (1)

Abdullah
Abdullah on 7 Apr 2024
...

Categories

Find more on Simulink in Help Center and File Exchange

Tags

Products


Release

R2023b

Community Treasure Hunt

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

Start Hunting!