Search All of the Math Forum:
Views expressed in these public forums are not endorsed by
NCTM or The Math Forum.
|
|
Alan
Posts:
151
Registered:
7/24/09
|
|
Re: cell mode execution
Posted:
Apr 2, 2013 12:00 PM
|
|
"Steven_Lord" <slord@mathworks.com> wrote in message <kjes7l$6eu$1@newscl01ah.mathworks.com>... > > > "Alan B" <monguin61REM@OVETHIS.yahoo.com> wrote in message > news:kjcp9o$pal$1@newscl01ah.mathworks.com... > > anyone <jaup@h/WSWLG{nR1qHe> wrote in message > > <514dfcd0$0$13514$c3e8da3$dd9697d2@news.astraweb.com>... > >> On Fri, 22 Mar 2013 20:50:18 +0000, Matt Raum wrote: > >> > >> > The poor error reporting in cell mode execution is still a major > >> > drawback to developing this way. > >> > >> so... you'd prefer it was silent, or were hoping Matlab would simply > >> re-code itself in some way? > >> > >> > I'm running MATLAB Version 7.13.0.564 > >> > (R2011b). Is there still nothing that can be done to get more > >> > informative error messages?? > > The way MATLAB executes code when you evaluate on a cell-by-cell basis is > slightly different from the regular way MATLAB functions or scripts run and > that difference makes doing what you request a little trickier than you > might expect. > > >> See: Help -> breakpoint > > Good suggestion anyone, but it won't work in this particular case. Running > individual code sections ignores breakpoints. > > http://www.mathworks.com/help/matlab/matlab_prog/run-sections-of-programs.html > > >> > For instance, I might execute a 200 line cell and get the following > >> > message at the command line: > >> > > >> > Index exceeds matrix dimensions. > >> > > >> > Then I have to figure out which of the 200 lines caused this error -- > >> > exhausting.....it would be really great if a machine could do that for > >> > me. > > It would be great. But the cell execution mechanism is currently not able to > do so. > > Some workarounds you can use right now: > > 1) Select the first half of the code in the cell and right-click. Evaluate > that selection. If the error occurs, the problem is in the first half of > your cell's code; if not, it's in the second half. Repeat this binary search > until you've located the error. > 2) Break your 200 line cell into smaller cells. The less code you have to > look through to isolate the issue, the easier it will be to locate. > 3) Run your code normally (not cell-by-cell) with breakpoints as anyone > suggested, locate the issue, fix it, then return to your workflow of > executing cell-by-cell. > > >> damned computers, eh? ...always trying to do what you say, not what you > >> mean. > >> > > > > It seems a reasonable request, considering that A) the machine CAN do it > > for us, in the context of a function, and B) it was "on the radar" as of > > four years ago. > > It is still on the radar. It has not come in for a landing yet as of the > current release R2013a. > > -- > Steve Lord > slord@mathworks.com > To contact Technical Support use the Contact Us link on > http://www.mathworks.com
Thank you, Steve. I appreciate the explanation, and I understand that implementing it is not trivial. I do not appreciate being treated like an ignorant child by 'anyone', for making a reasonable feature request for software that I pay for.
|
|
|
|