Invalid array indexing. Column 77. Help

quiver3(position(1), position(2), position(3), normalAcceleration * cross(velocity, acceleration)(1), normalAcceleration * cross(velocity, acceleration)(2), normalAcceleration * cross(velocity, acceleration)(3), 'g', 'LineWidth', 1.5);
Error: File: plotIntersection.m Line: 40 Column: 77
Invalid array indexing.
I don't know how to fix it. Help me, pls.

답변 (1개)

VBBV
VBBV 2023년 5월 26일

0 개 추천

delete the (1), (2) & (3) after cross function and place it inside as shown
quiver3(position(1), position(2), position(3), ...
normalAcceleration * cross(velocity(1), acceleration(1)), normalAcceleration * cross(velocity(2), acceleration(2)),...
normalAcceleration * cross(velocity(3), acceleration(3)), 'g', 'LineWidth', 1.5);

카테고리

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

태그

질문:

2023년 5월 26일

답변:

2023년 5월 26일

Community Treasure Hunt

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

Start Hunting!

Translated by