Hi,
I have some 3D geometry that is moving. I want to plot this in a loop so the viewer can see the kinematics of my system. This works fine.
I have an issue when I try to limit the axis of my plot. I write:
xlim([950 1350])
ylim([-250 -750])
zlim([-50 450])
But I get the following error:
"Index exceeds the number of array elements (2). Error in Quarter_vehicle_kinematics (line 313)
xlim([950 1350])"
When I extract the axes properties I can see my xlim and ylim that are both 2D, but no zlim.
I don't understand why this error occurs, I'm not indexing my xlim.
Please help

댓글 수: 3

Adam
Adam 2019년 10월 8일
Did you name a variable xlim?
You can call
which xlim
to check this (or just look through your code!)
No I didn't unfortunately
>> which xlim
C:\Program Files\MATLAB\R2019a\toolbox\matlab\graph3d\xlim.m
Thank you for reminding me to check the (overlooked) obvious
Adam
Adam 2019년 10월 8일
If that is literally the only thing on the line triggering the error I don't see how you could get that particular error message without xlim being a variable so it is odd.

댓글을 달려면 로그인하십시오.

답변 (0개)

카테고리

도움말 센터File Exchange에서 Annotations에 대해 자세히 알아보기

제품

릴리스

R2019a

질문:

2019년 10월 8일

댓글:

2019년 10월 8일

Community Treasure Hunt

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

Start Hunting!

Translated by