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: Stephen Montgomery-Smith
Subject: Re: problem with the octave built-in function "kron"
Date: Fri, 03 May 2013 11:28:33 -0500
User-agent: Mozilla/5.0 (X11; Linux i686; rv:17.0) Gecko/20130329 Thunderbird/17.0.5

Use speye instead of eye.


On 05/03/2013 10:02 AM, scigeek 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
> 
> 



reply via email to

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