You need to evaluate each row of variables in "m" if you intend to use the function the way you have shown. Try something like this:

Regards ElbartoCode:function E = solve_it(m,t,i) %where m is a 2 column matrix with 1 or more rows(amount is of the users choosing) for j = 1:size(m,1); r=m(j,1); s=m(j,2); A=r./s; invE=A+1/t+1/i; E(j,1)=1/invE; end