Quantcast
Channel: Latest Discussions - COMSOL Forums
Viewing all articles
Browse latest Browse all 26527

How to duplicate solution in Matlab

$
0
0
Hi all,

I am now using the COMSOL Livelink for Matlab. I create two solutions whose soltags are 'sol1' and 'sol2' respectively. I want to copy the solution from 'sol1' to 'sol2'.

Here is what I am doing:

[u udot] = mphgetu(model,'soltag','sol1');
model.sol('sol2').setU(u);
model.sol('sol2').set('tlist',tstr); % where tstr is the time list string of 'sol1'
model.sol('sol2').createSolution;


My questions are:
a) How to copy the velocity components in sol1 to sol2?
b) Are there any fast or efficient ways to duplicate solution?


Thanks a lot

Dan

Viewing all articles
Browse latest Browse all 26527

Trending Articles