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:
onCleanup for Ctrl-C

Subject: onCleanup for Ctrl-C

From: Daniel

Date: 20 Jul, 2013 09:12:11

Message: 1 of 3

Hello everyone,

I have been using "onCleanup" to do some work when a program exists, such as deleting some files, writing something to files, and so on. It also works when I press Ctrl-C. Everything is fine in the MATLAB environment.

However after I compile (deploy) the MATLAB program, onCleanup doesn't work when I press Ctrl-C. The files I want to delete when the program exists are still there. Some files I want to update remain unchanged. I don't understand what causes the problem. How should I do to make it work? Thanks!

Daniel

Subject: onCleanup for Ctrl-C

From: Daniel

Date: 22 Jul, 2013 12:58:12

Message: 2 of 3

Help~~ Anyone has a suggestion? Thanks.

Subject: onCleanup for Ctrl-C

From: Eric Sampson

Date: 22 Jul, 2013 16:00:15

Message: 3 of 3

"Daniel " <bri.danlee@gmail.com.removethis> wrote in message <ksdk9b$gg5$1@newscl01ah.mathworks.com>...
> Hello everyone,
>
> I have been using "onCleanup" to do some work when a program exists, such as deleting some files, writing something to files, and so on. It also works when I press Ctrl-C. Everything is fine in the MATLAB environment.
>
> However after I compile (deploy) the MATLAB program, onCleanup doesn't work when I press Ctrl-C. The files I want to delete when the program exists are still there. Some files I want to update remain unchanged. I don't understand what causes the problem. How should I do to make it work? Thanks!
>
> Daniel

Sounds like a good time to contact Technical Support, 508-647-7000, press 2.

Tags for 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