HOW TO SOLVE THIS?
이전 댓글 표시

댓글 수: 8
Image Analyst
2023년 1월 1일
I can't read that language but the equation goes in MATLAB exactly as it is written there. That is proper syntax.
daniel
2023년 1월 1일
Torsten
2023년 1월 1일
function v = velocity(x,y,z,t)
v = sqrt(diff(x).^2+diff(y).^2+diff(z).^2)./diff(t);
end
Done.
daniel
2023년 1월 1일
Yes, then supply t,x,y and z as vectors of the same length.
Or check their lengths in the function.
Matt J
2023년 1월 1일
See guidelines for homework help:
daniel
2023년 1월 1일
Walter Roberson
2023년 1월 1일
In the case of that error message, the problem is that you had accidentally created a variable named velocity that you are then trying to index. If there is a variable in scope and a function of the same name, MATLAB gives priority to the variable in scope.
채택된 답변
추가 답변 (0개)
카테고리
도움말 센터 및 File Exchange에서 Programming에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!

