How can I use "system" command with input without typing myself all the input everytimes ?

4 次查看(过去 30 天)
Hello everyone,
I would like to use the system command in order to call a program which needs some information to be run.
The program that i want to use is called "dammif" and allow me to get the shape of some molecule. This program, when i run it, ask me things like unit or the name of the output file(and a lot of other things). I have to run dammif a lot and i would like to use matlab to run dammif for me when I'm not at work.
I look system's documentation but i didn't understand the 'echo' thing...
On the picture, dammif ask me for the gnom file I want to read, this gnom file is called 'gnom_med_320.out' but i don't know what I can do so matlab automatically fill this question with 'gnom_med_320.out' for instance. Is there a way to do it ?question.pngI hope I'm clear.
thank you for your help !

采纳的回答

Jan
Jan 2019-7-30
Please take a look into the documentation of dammif: https://www.embl-hamburg.de/biosaxs/manuals/dammif.html
Here you can see how to call this 3rd party tool with input arguments, such that you do not have to type them in dynamically. Use Matlab's sprintf to create the corresponding string, which is uses as input for the system command.
  1 个评论
Loïc Videau
Loïc Videau 2019-7-30
Thank you very much ! I didn't knew sprintf function but it work !
I know the documentation of dammif but i needed to run it in interactive mode to change an option in particular !
thank you again for your rapidity,
Loïc

请先登录,再进行评论。

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 MATLAB 的更多信息

标签

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by