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!

