The problem is I want both return variables to be output on the screen. Instead, the first variable gets output and the second does nothing.
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
function [location velocity] = missile_estimation(t, radarpoints)
format long g;
t_array = 0:0.1:0.5;
x = radarpoints;
loc = 1:3;
vel = 1:3;
z = t;
for i = 1:3
bx0=x(1,i);
bx1=(x(2,i)x(1,i))/(t_array(2)t_array(1));
bx2=((x(3,i)x(2,i))/(t_array(3)t_array(2))....
bx3=(((x(4,i)x(3,i))/(t_array(4)t_array(3)).....
fx= bx0 +bx1*(zt_array(1)) + bx2*(zt_array(1)).....
loc(i) = fx;
f2x = bx1 + 2*bx2*z  bx2*t_array(2.....
vel(i) = f2x;
end
location = loc(1:3);
velocity = vel(1:3);
%%%%%%%%%%%%%%%%%%%
Only location gets output, velocity does not. Maybe, there is some fundamental misunderstanding on matlab return parameters on my side.
OUTPUT
ans =
9374.84640000009 10040.8144 509.000000000012
I need both variable to output this way and I'm not sure what I'm doing wrong. Any help would be appreciated.
