function [r, v] = calcularPosicaoVelocidade(t) x = 2sin(2t); y = 3cos(2t); z = -2t^2; r = [x, y, z]; end
function [r, v] = calcularPosicaoVelocidade(t) x = 2sin(2t); y = 3cos(2t); z = -2t^2; r = [x, y, z]; dx_dt = 4cos(2t); dy_dt = -6sin(2t); dz_dt = -4t; v = [dx_dt, dy_dt, dz_dt]; end
t = 1; % valor específico de t [r, v] = calcularPosicaoVelocidade(t); disp(['Vetor posição em t = 1: ', num2str(r)]); disp(['Vetor velocidade em t = 1: ', num2str(v)]);