Note: This discussion is about an older version of the COMSOL Multiphysics® software. The information provided may be out of date.
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.
model.param.set
Posted 29 déc. 2014, 18:39 UTC−5 Interfacing, Geometry, Parameters, Variables, & Functions Version 4.4 1 Reply
Please login with a confirmed email address before reporting spam
Hi,
Are there someone would like to give me some help about 'model.para.set'?
I have three variables in comsol model, which are p_1, p_2, p_3.
So in my matlab function, I worte
model.para.set ('p_1',x(:,1));
model.para.set ('p_2',x(:,2));
model.para.set ('p_1',x(:,3));
Is there some way to write them somehow in one sentence, like
model.param.set(p(j),x(k,j));
this is totally wrong, but I want to find a way to call 'model.param.set' only once and deal with a matrix rather than several times deal with an element each time.
Thanks for the help in advance.
Best regards
Yanrui
Are there someone would like to give me some help about 'model.para.set'?
I have three variables in comsol model, which are p_1, p_2, p_3.
So in my matlab function, I worte
model.para.set ('p_1',x(:,1));
model.para.set ('p_2',x(:,2));
model.para.set ('p_1',x(:,3));
Is there some way to write them somehow in one sentence, like
model.param.set(p(j),x(k,j));
this is totally wrong, but I want to find a way to call 'model.param.set' only once and deal with a matrix rather than several times deal with an element each time.
Thanks for the help in advance.
Best regards
Yanrui
1 Reply Last Post 30 déc. 2014, 19:32 UTC−5