Discover MakerZone

MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi

Learn more

Discover what MATLAB® can do for your career.

Opportunities for recent engineering grads.

Apply Today

Thread Subject:
Stop fsolve; keep result

Subject: Stop fsolve; keep result

From: Cory

Date: 20 Nov, 2012 17:21:08

Message: 1 of 3

Hi MATLABers,

I'm running fsolve on a big problem with mixed results. After a week or so of computation, I'd like to interrupt the code and just report whatever results I have so far. However, I'm not sure how to stop fsolve while maintaining access to the last point tried (e.g. by using Ctrl+C). Is there a way to do this?

Thanks,
Cory

Subject: Stop fsolve; keep result

From: Alan_Weiss

Date: 20 Nov, 2012 18:54:11

Message: 2 of 3

On 11/20/2012 12:21 PM, Cory wrote:
> Hi MATLABers,
>
> I'm running fsolve on a big problem with mixed results. After a week
> or so of computation, I'd like to interrupt the code and just report
> whatever results I have so far. However, I'm not sure how to stop
> fsolve while maintaining access to the last point tried (e.g. by using
> Ctrl+C). Is there a way to do this?
>
> Thanks,
> Cory

I am very sorry to say that I know of no way to do this. I know, it is
frustrating.

Next time, you can prepare for this before you call fsolve:
* Have an output function checkpoint your intermediate results to a
file, or to the workspace
* Use a plot function to show some results, such as the current point
(@optimplotx)

Good luck,

Alan Weiss
MATLAB mathematical toolbox documentation

Subject: Stop fsolve; keep result

From: Cory

Date: 20 Nov, 2012 19:22:08

Message: 3 of 3

Thanks for the update. I figured it might not be possible, but wanted to check if there was some hope. It is, indeed, frustrating (official MATLAB people take note).

Cory

Alan_Weiss <aweiss@mathworks.com> wrote in message <k8gjkj$fsd$1@newscl01ah.mathworks.com>...
> On 11/20/2012 12:21 PM, Cory wrote:
> > Hi MATLABers,
> >
> > I'm running fsolve on a big problem with mixed results. After a week
> > or so of computation, I'd like to interrupt the code and just report
> > whatever results I have so far. However, I'm not sure how to stop
> > fsolve while maintaining access to the last point tried (e.g. by using
> > Ctrl+C). Is there a way to do this?
> >
> > Thanks,
> > Cory
>
> I am very sorry to say that I know of no way to do this. I know, it is
> frustrating.
>
> Next time, you can prepare for this before you call fsolve:
> * Have an output function checkpoint your intermediate results to a
> file, or to the workspace
> * Use a plot function to show some results, such as the current point
> (@optimplotx)
>
> Good luck,
>
> Alan Weiss
> MATLAB mathematical toolbox documentation

Tags for this Thread

No tags are associated with this thread.

What are tags?

A tag is like a keyword or category label associated with each thread. Tags make it easier for you to find threads of interest.

Anyone can tag a thread. Tags are public and visible to everyone.

Contact us