update a part of a file through other file content

Hi, I am running a toolbox, where I am providing parameters along with many other values as an input file. After first estimation run, I want to update a part of my input file from one of the file content generated as an output in workspace.
My input file looks like-
********** MODEL STATES
d/dt(mi) = ksyn_mi * NFKB - kdeg_mi * mi
d/dt(M) = 0
********** MODEL PARAMETERS
ksyn_mi1 = 1
kdeg1_mi1 = 1
kdeg2_mi1 = 1
ksyn_I = 0.0961
kdeg_I = 0.0961
kph1_I = 1
********** MODEL VARIABLES
********** MODEL REACTIONS
********** MODEL FUNCTIONS
In this file, I want to replace the values inside ****** MODEL PARAMETERS and ******** MODEL VARIABLES in each new estimation run, rest of the part will remain the same. And I also want to know that how can I access the workspace output folder in my code to replace input file content?

댓글 수: 1

Jan
Jan 2015년 9월 30일
What is "the workspace output folder"? The solution is trivial: Import the file, apply the required changes, write the file. A more specific question would allow to answer with more details. So please show us, what you have tried so far and explain, which problems occur.

답변 (0개)

이 질문은 마감되었습니다.

질문:

2015년 9월 30일

마감:

2021년 8월 20일

Community Treasure Hunt

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

Start Hunting!

Translated by