Scilab not returning variables in variable window
<p>I have created a function that returns the magnitude of a vector.the output is 360x3 dimension matrix. the input is 360x2.
Everything works fine outside the function. how do i get it to work ?</p>

<pre><code>clc
P_dot_ij_om_13= rand(360,2);  // 360x2 values of omega in vectors i and j

//P_dot_ij_om_13(:,3)=0;

function [A]=mag_x(A)


//b="P_dot_ijOmag_"+ string(k);

 //execstr(b+'=[]');         // declare indexed matrix P_dot_ijOmag_k
 //disp(b)


 for i=1:1:360

     //funcprot(0);

     A(i,3)=(A(i,2)^2+A(i,1)^2)^0.5;      //calculates magnitude of i and j and adds 3rd column

    disp(A(i,3),"vector magnitude")


 end

funcprot(1);

return [A]      // should return P_dot_ijOmag_k in the variable browser  [360x3 dim]

endfunction

mag_x(P_dot_ij_om_13);


//i=1;
//P_dot_ij_om_13(i,3)= (P_dot_ij_om_13(i,2)^2+P_dot_ij_om_13(i,1)^2)^0.5;//           example
</code></pre>