Home > Archive > Matlab > March 2006 > Recursion Limit Reached
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
| Author |
Recursion Limit Reached
|
|
| Satyajayant Misra 2006-03-31, 10:03 pm |
| I was running the following code on the matlab command prompt:
C = eye(3);
d = zeros(3,1);
Aeq = [1 2 4];
beq = 7;
[X, fval] = lsqlin(C, d, [], [], Aeq, beq)
It gives me an error:
Warning: Large-scale method can handle bound constraints only;
switching to medium-scale method.
> In <a
href="error:/usr/local/mathworks/toolbox/optim/lsqlin.m,228,1">lsql
in at 228</a>
??? Maximum recursion limit of 500 reached. Use
set(0,'RecursionLimit',N)
to change the limit. Be aware that exceeding your available stack
space can
crash MATLAB and/or your computer.
Error in ==> <a
href="error:/home/jay/matlab-softwares/cvx/matlab6/false.m,2,1">fal
se at 2</a>
z = logical( zeros( varargin{:} ) );
-------------------
I tried increasing the stack size on my linux box (Fedora Core 4) to
set it to unlimited however on setting the limit to 1000, matlab
crashes with a segmentation fault.
Please suggest.
-Jay
| |
| Randy Poe 2006-03-31, 10:03 pm |
|
Satyajayant Misra wrote:
> I was running the following code on the matlab command prompt:
>
> C = eye(3);
> d = zeros(3,1);
>
> Aeq = [1 2 4];
> beq = 7;
>
> [X, fval] = lsqlin(C, d, [], [], Aeq, beq)
>
> It gives me an error:
> Warning: Large-scale method can handle bound constraints only;
> switching to medium-scale method.
> href="error:/usr/local/mathworks/toolbox/optim/lsqlin.m,228,1">lsql
> in at 228</a>
> ??? Maximum recursion limit of 500 reached.
There shouldn't be any recursion going on. Sounds
like a name conflict, i.e. you have some function with
the same name as something lsqlin is calling.
> Use
> set(0,'RecursionLimit',N)
> to change the limit. Be aware that exceeding your available stack
> space can
> crash MATLAB and/or your computer.
>
> Error in ==> <a
> href="error:/home/jay/matlab-softwares/cvx/matlab6/false.m,2,1">fal
> se at 2</a>
Aha! That's your real clue. You have a Matlab function
called "false", which is a reserved word, and perhaps
"false" even refers to the Matlab value "false".
Rename this function.
- Randy
|
|
|
|
|