error: leasqr: subscript indices must be either positive integers less than 2^31 or logicals
>
>
>> error: called from
>> leasqr at line 329 column 9
>>
>
Since it's giving that error pointing out line 329 within leasqr I don't think he's shadowing the function.
Bharath:
ok, I removed the definitions for x, p and pin from the function f, as there's no point in passing it values of f if the function is setting them anyway. So:
function F = f(x,p)
typeinfo(x)
m(1,1)=20;
for i=1:length(x)
m(i+1,1)=((p(1)-m(i,1))/(p(2)*p(3))+((p(4)*x(i,2)*(x(i,3)-m(i,1)))+(p(5)*x(i,4))+(p(6)*x(i,5)))/(p(3))+p(7))+m(i,1);
endfor
F=m(2:end);
endfunction
>>x = [19.54533 0.00000 21.33717 0.00000 0.60320;
19.30000 0.00000 21.28817 0.00000 0.66134;
19.30000 0.00000 20.55900 0.00000 0.71948;
19.13750 0.00000 21.21883 0.00000 0.77762;
19.00000 0.00000 20.68650 0.00000 0.83576];