help-octave
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Using fsolve with time series data


From: Terry Duell
Subject: Re: Using fsolve with time series data
Date: Sat, 10 Aug 2013 09:36:48 +1000
User-agent: Opera Mail/12.16 (Linux)

Hello Alexander,

On Fri, 09 Aug 2013 21:50:07 +1000, Alexander Barth <address@hidden> wrote:

Dear Terry,

For octave "x(1)" is always a scalar, not a vector. In fact, you have 8 * N scalar unknowns. Thus x can be written as a N x 8 (or 8 x N, but this will
be slower in your case) matrix of unknowns.
You have to write your function fcn like this:

x(:,7) - R1*x(:,3) + R1*x(:,6) - R1*x(:,5).*x(:,5) - R1*x(:,2).*x(:,2) - A1
...

I assume that you mean by x(5)*x(5) a element-wise product. If it is a
scalar product use  x(:,5)'*x(:,5).
Call then fsolve with

[x, fvec, info] = fsolve(fcn, zeros(N,8));

I hope this helps.

I think it does.
I had attempted to do it that way, but didn't get too far. I must have had some mistakes. I have just tried it again, following your advice, and now run into "error: memory exhausted or requested size too large for range of Octave's index type".
I have yet to look into what needs to be done to get past this problem.

Thanks for your help.

Cheers,
--
Regards,
Terry Duell


reply via email to

[Prev in Thread] Current Thread [Next in Thread]