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

New to MATLAB?

Thread Subject:
Problem with exiting an executable launched with an input file

Subject: Problem with exiting an executable launched with an input file

From: Ronan

Date: 22 Mar, 2011 18:36:04

Message: 1 of 2

Hello everyone,

I am running an executable with an input file, from a Matlab 2007 routine using:
! exec_name < input_file.txt

But the executable ends with the following error message
   fmt: end of file
   apparent state: unit 5 (unnamed)
   last format: (A)
   lately reading sequential formatted external IO
   This application has requested the Runtime to terminate it in an unusual way.
   Please contact the application's support team for more information."

Although the error message is displayed , the executable has run correctly and Matlab carries on as expected with no further manual input.

And when I run the executable with Matlab 2009 from a distant server, it still performs as expected and I get the same error message. But this time an additonal windows (which requires user interention to be manually closed) pops-up saying:
   avl.exe has stopped working correctly. Please close the program.

However, when I launch the execuatble from the Matlab command window and input manually the contents of the input .txt file, the executable closes correctly with no warning message or windows poping up.

Any ideas why that might be and how I can solve this porblem?
Many thanks in advance for your help.

Subject: Problem with exiting an executable launched with an input file

From: Sadik

Date: 23 Mar, 2011 01:35:07

Message: 2 of 2

Hi Ronan,

It seems it is your executable which is the problem! :D

If I were you, I would make sure input.txt is in a format compatible with the executable because the error message suggests that it is not.

So, once you make sure you are in compliance with the requirements imposed by your executable, you should not have a problem at all. I am personally running executables through matlab and do not experience any problems in general.


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