Re: Input to external program
- From: "Fangjun Jiang" <f@xxxxx>
- Date: Tue, 12 Sep 2006 16:16:32 -0400
I don't know if this old trick can help you.
When you run a dos program which asks for inputs, you can use,
EPDRiv1H.exe <inputs.txt
inputs.txt is a text file, in your case, it contains just one
character 'y' without the single quote.
Try to see if it works for you.
Heather wrote:
.
Hi,
I am calibrating a model and need to be able to run it over and
over
100's of times from MatLab. I have figured out how to call the
model
from MatLab using dos or ! but the problem is that once the model
starts to run, a question requiring user input pops up in the
command
prompt (it asks if I want to create a certain type of file while
the
model is running y/n). I need to be able to answer "y". How can I
send this input to the command prompt automatically from MatLab
(since
it will happen 100s of times).
I tried using:
dos('EPDRiv1H.exe &') % to call the EPDRiv1H model
dos('y') % to answer 'y' to the question
that
pops up in the command prompt when EPDRiv1H runs
but that does not work since 'y' is not a system command.
Please let me know if you can help!
Thanks,
Heather
- Follow-Ups:
- Re: Input to external program
- From: Heather
- Re: Input to external program
- References:
- Input to external program
- From: Heather
- Input to external program
- Prev by Date: Re: interfacing matlab/simulink to routines written in c/c++/fortran
- Next by Date: linux 64 machines
- Previous by thread: Input to external program
- Next by thread: Re: Input to external program
- Index(es):
Relevant Pages
|