I need to use two scripts that are part of a packaged program many, many times in a row, so I'd like to find a way to essentially put them in a loop. More specfically, I need to open hawt_params.m, change the variable blade_params.pitch, save it, then open create_hawt.m, change the entry in arg_list{3}, and then run it. I did some searching and it seems the usual advice for such questions is to write functions and not scripts, which, of course, would make this trivial. I'd really rather not try to convert someone else's scripts into function, though (unless that's easier than I'm imagining). I'll admit that I, myself, am a script writer, so perhaps the barrier is more mental. Anyway, I'm looking for overall efficiency of the task, so, if there's a way to get it done with the existing scripts, I'd love to learn how. Thanks.
MATLAB: Edit and run a script with another script
editin aMATLABrunscript
Related Question
- Is it possible to convert a Simulink Model into a Matlab function
- Copying a block and dynamically changing the name and sub block names.
- Calling Functions Files within a Script File
- A way to work around MATLAB’s inability of put a local function into M-script
- How to find all the blocks connected to a start block in simulink using matlab code
Best Answer