Dear all,
I have this equation:
kk=randn(1000,1); u=randn(999,1); kk(2:end)=kk(1:end-1)+u*d;
and I want to estimate the scalar 'd' in the last equation. So, I try to do some minimization but I am not sure if this is the correct way to move on.
So I have something like this
f = @(x) sum( ( kk(2:end)-kk(1:end-1)-u*sqrt(x) ).^2 );fun = @(x)f(x);x=fminsearch(fun, 0.2);
I am looking not only for efficiency but also for speed in this calculation.
Thanks
Best Answer