Table size limit?
Ältere Kommentare anzeigen
Here is what I am seeing:
>> mnl = readmps('mnl.mps');
??? Error using ==> addtotable at 12
Too many entries in table.
Error in ==> readmps at 150
rowtable=addtotable(rowtable,f{2},rowcount);
I am trying to use readmps, a file off the matlab exchange for creating linear programming problems in matlab. I have used the program before with no problems. I suspect that the mps file I am trying to read in is just to big. Is this likely the cause? Is there some size limit on tables that I am unaware of?
Antworten (5)
Edward Umpfenbach
am 5 Mär. 2012
0 Stimmen
Walter Roberson
am 5 Mär. 2012
0 Stimmen
I do not find any readmps routine in the MATLAB File Exchange.
I find lpmexext which appears to have a read_mps command in it. That code appears to have a limit of 100 lps. You might be able to increase that by increasing the value of the LPMAX #define near the beginning of the C source.
1 Kommentar
Walter Roberson
am 5 Mär. 2012
In newtable.m change the 1000 to a larger value.
Edward Umpfenbach
am 5 Mär. 2012
0 Stimmen
Jan
am 5 Mär. 2012
There is no real chance, that somebody can guess, what's going on. We do neither know the function nor the file.
I suggest to use the debugger to stop Matlab, when the problem occurs:
dbstop if error
Then check the value of the local variables. Perhaps rowcount is Inf by accident or a damaged file? Perhaps it is negative and the error message is misleading?
Did you ask the author?
Edward Umpfenbach
am 5 Mär. 2012
0 Stimmen
3 Kommentare
Walter Roberson
am 5 Mär. 2012
The error message you indicate is hard-coded in to addtotable.m and is based upon 90% occupancy of the declared table size, where the declared table size is initialized to 1000 in newtable.m
The error message is _not_ produced as a result of a try/catch around having run out of memory: it is produce by the code detecting that the table it pre-created is full.
Edward Umpfenbach
am 6 Mär. 2012
Walter Roberson
am 6 Mär. 2012
Looks like it to me. Or at least _that_ won't be the limit you run in to ;-)
Kategorien
Mehr zu Write C Functions Callable from MATLAB (MEX Files) finden Sie in Hilfe-Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!