Discussion Closed This discussion was created more than 6 months ago and has been closed. To start a new discussion with a link back to this one, click here.
Changing COMSOL parameter using MATLAB LiveLink
Posted 2010年8月27日 GMT-4 00:56 0 Replies
Please login with a confirmed email address before reporting spam
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?
Hello Benjamin Moroney
Your Discussion has gone 30 days without a reply. If you still need help with COMSOL and have an on-subscription license, please visit our Support Center for help.
If you do not hold an on-subscription license, you may find an answer in another Discussion or in the Knowledge Base.