Running System Command, Importing and Exporting Text file, Editing Text file(Input Parameters)
Show older comments
I here by attached I123.txt file . I want to change the following line in I123.txt file
ELAStic ISOTropic 1000.0 0.25 --- last two parameters 1000.0 and 0.25 to user defined input parameters and overwrite I123.txt file without creating new file and i can run the system command -- system('system command') to execute the file. When i run in matlab scrip code the following appears in as matlab command prompt window
I n p u t F i l e n a m e s
Specify filenames:
Input Data (default: NONE ) :
Enter Name --> (Here i have to enter ---- I123.txt (User should enter from keyboard) in matlab command prompt window which are executable system external program. but that should be automatically coded in script . After that the following appears
Are filenames correct?( y or n; r = redefine all, s = stop) : (y - User should enter from keyboard) .I have to automatically write in matlab script code.
After that system program generat Output file named by default as O123.txt. Matlab should call (export) that Output text file in same script code and expolit that data according to the user needs.
If i want to repeat the above steps for n iterations what is the procedure,
My aim is to run the program and code calls the system program and generate output file and export that to matlab script code and expolit that data according to the user needs.
The following discussion for reference.
Any help greatly appreciated. Thanks in advance .
4 Comments
Mario Malic
on 17 Mar 2020
Edited: Mario Malic
on 17 Mar 2020
I kindly ask you to start writing the code, you have understanding of what needs to be done, therefore, you can do it.
% Loop n times
% Read file
% Change data (if you know parameters beforehand, rather skip the manual input from keyboard)
% Save file
% call system
RAKESH KUMAR TOTA
on 19 Mar 2020
Mario Malic
on 19 Mar 2020
You can't do it easily. Cannot help you with that.
RAKESH KUMAR TOTA
on 24 Mar 2020
Answers (0)
Categories
Find more on Workspace Variables and MAT Files in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!