When I used my customize state space to perform navigation,the following errors occurs:
조회 수: 2 (최근 30일)
이전 댓글 표시
ss=myCustomUAVStateSpace("MaxRollAngle",pi/6,...
"AirSpeed",25,...
"FlightPathAngleLimit",[-0.1,0.1],...
"Bounds",[-40,50;-40,50;-40,50;-inf,Inf;-Inf,Inf;-Inf,Inf;-Inf,Inf],...
"Sound",340.0,...
"Press",1.0055e+05,...
"AirDensity",1.2174);
Error using StateSpace
Expected StateBounds to be of size 7x2, but it is of size 1x1.
validateattributes(bounds, {'double'}, ...
obj.StateBoundsInternal = obj.validateStateBounds(bounds, ...
obj.StateBounds = bounds;
I can't solve the problem although I tried many times.What can I do to fix the errors?
댓글 수: 0
채택된 답변
Jianxin Sun
2022년 3월 7일
이동: Remo Pillat
2022년 9월 1일
Based on your error message, it seems that at line 109 of your code myCustomUAVStateSpace, you assigned a scalar instead of the 7x2 matrix. I'd recommend you put a breakpoint at the start of your constructor code and run your command. By stepping through your constructor, you should be able to find out why bounds is a scalar at line 109.
댓글 수: 0
추가 답변 (1개)
Walter Roberson
2022년 9월 1일
Are you using https://www.mathworks.com/help/nav/ref/nav.statespace-class.html ?
The property name is StateBounds, but you configure Bounds not StateBounds
댓글 수: 0
참고 항목
카테고리
Help Center 및 File Exchange에서 Atomic, Molecular & Optical에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!