HOW TO SOLVE THIS?
Mostrar comentarios más antiguos

8 comentarios
Image Analyst
el 1 de En. de 2023
I can't read that language but the equation goes in MATLAB exactly as it is written there. That is proper syntax.
daniel
el 1 de En. de 2023
Torsten
el 1 de En. de 2023
function v = velocity(x,y,z,t)
v = sqrt(diff(x).^2+diff(y).^2+diff(z).^2)./diff(t);
end
Done.
daniel
el 1 de En. de 2023
Yes, then supply t,x,y and z as vectors of the same length.
Or check their lengths in the function.
Matt J
el 1 de En. de 2023
See guidelines for homework help:
daniel
el 1 de En. de 2023
Walter Roberson
el 1 de En. de 2023
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.
Respuesta aceptada
Más respuestas (0)
Categorías
Más información sobre Programming en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!

