help-octave
[Top][All Lists]
Advanced

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

Re: problem with the octave built-in function "kron"


From: Juan Pablo Carbajal
Subject: Re: problem with the octave built-in function "kron"
Date: Fri, 3 May 2013 17:51:04 +0200

On Fri, May 3, 2013 at 5:02 PM, scigeek <address@hidden> wrote:
> I am trying to run the "kron" function in octave, but as soon as I run it, it
> gives the following line of error.
>
> error: memory exhausted or requested size is too large for octave range
> type--
>
> here is the piece of code that I am running:
> =================================
> rx = 800, ry =571
>
> x = linspace(0,1,rx);
> y = linspace(0,1,ry);
> dx = x(2)-x(1); dy = y(2)-y(1);
> ex = ones(rx,1); ey=ones(ry,1);
> Ix = eye(rx); Iy = eye(ry);
> Dx= (spdiags([ex -2*ex ex],[-1 0 1],rx,rx))/dx^2;
> Dy= (spdiags([ey -2*ey ey],[-1 0 1],ry,ry))/dy^2;
> L = kron(Iy,Dx)+kron(Dy,Ix);
> ================================
>
> Can any body help ?
> Thanks
>
>
>
> --
> View this message in context: 
> http://octave.1599824.n4.nabble.com/problem-with-the-octave-built-in-function-kron-tp4652601.html
> Sent from the Octave - General mailing list archive at Nabble.com.
> _______________________________________________
> Help-octave mailing list
> address@hidden
> https://mailman.cae.wisc.edu/listinfo/help-octave

Check your sizes... the matrix after kron is really huge.
What are you trying to achieve? Can't you do it without kron or iteratively?


reply via email to

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