Thanks for the mail. I am sorry that I have used mat earlier, now I changed the function as follows:
I am generating a matrix of [length(x), 1] as output from the function. My measured value is also a matrix of [length(x), 1].
What I would like to do now is to estimate parameters p. I am using the following command to run the optimization program ( I have tried with nonlinear curve fit as well):
pin ,x and y are initialized. The problem is when I run the optimization algorithm, it throws me the following error:
error: leasqr: subscript indices must be either positive integers less than 2^31 or logicals
error: called from
leasqr at line 329 column 9
I look forward to your reply.