I use this function in a nested for and I get this error: subscript indices must either be real positive integers or logicals
Zpred = h(Xpred)
where Xpred is a matrix
function zk=h(x)zk(1,:)=sqrt(900+(x(1,:)-30).^2);zk(2,:)=x(2,:).*(x(1,:)-30)./zk(1,:)
can anyone help me to find the error
Best Answer