-
Filter by Topic
Most Popular
All Topics
- List all discussions
Changing COMSOL parameter using MATLAB LiveLink
|
Thread index | Previous thread | Next thread | Start a new discussion |
August 27, 2010 4:56am UTC
Changing COMSOL parameter using MATLAB LiveLink
Hi all,
I have a COMSOL model as an m-file simulating transverse nuclear magnetisation during a magnetic gradient pulse. The file itself works, but to simulate the experiment I want I need to re-run the simulation multiple times while varying a parameter we'll call g.
I used to run a parametric sweep to do this, but with the way I have set my system up in MATLAB (I reset the system with different variables and run it multiple times in the single pass) means that I would prefer to do this parameter stepping outside the model itself.
I have run into problems previously attempting to use MATLAB variables as COMSOL variables (i.e. if I set a value X and attempt to use it in the model, for instance as model.param.set('gs', 'X'); it does not work.
Is there a way to do this, or if not, what would be the best way to program a parametric sweep in MATLAB?
Reply | Reply with Quote | Send private message | Report Abuse
Rules and guidelines

