Converting an array of ODEs as strings into functions for use in an ODE solver:
1 Ansicht (letzte 30 Tage)
Ältere Kommentare anzeigen
I'm currently writing a script in MATLAB to grab and convert a set of ODEs from a text file used in another piece of software as well as the parameter values. It sorts everything, assigns array-based parameter names, i.e. kiir -> var_val(1) etc.
The issue I'm reaching is my functions are as below:
They're currently strings and I had hoped to use the str2func function to translate them into functions and run them through an ODE solver, i.e. ODE45 etc. I've been attempting to get it into a similar form as presented by the ODE45 Mathworks documentation:
i.e. an array of actual functions, this has run into lots of issues, i.e. not having valid variables set to not being able to store functions handles in anything other than cells which I can't get to work with the solver.
I would greatly appreciate any advice and am very happy to answer any questions/provide code for clarification.
EDIT: I realise I can just copy them over manually now that they're processed but I'm planning on making an app/GUI for it after this step.
0 Kommentare
Antworten (0)
Siehe auch
Kategorien
Mehr zu Ordinary Differential Equations finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!