Hi,
I am very new user of COMSOL. I am using COMSOL 51. and COMSOL 5.1 with Matlab.
I have a comsol model in comsol GUI. It has a 2D plot with a tag <pg1>. I want to see the graph in matlab.
At first I opened Comsol with matlab. Then I wrote a code to import the comsol model. Everything works fine. But when I try to plot the graph by the command mphplot(model, 'pg1'), it shows error.
My code is like bellow
import com.comsol.model.*
import com.comsol.model.util.*
model=mphload('Rahman.mph'); %Rahman is the name of the model
info=mphsolinfo(model, 'solname', 'sol1');
tlist=info.solvals;
pd=mpheval(model, 'c'); % c is the dependent variable.
mphplot(model, 'pg1');
I would like to see the graph in matalb. But matlab is showing that there is an error in line mphplot.
Does anybody knoe how to use the mphplot command correctly?? Thanks in advance.
I am very new user of COMSOL. I am using COMSOL 51. and COMSOL 5.1 with Matlab.
I have a comsol model in comsol GUI. It has a 2D plot with a tag <pg1>. I want to see the graph in matlab.
At first I opened Comsol with matlab. Then I wrote a code to import the comsol model. Everything works fine. But when I try to plot the graph by the command mphplot(model, 'pg1'), it shows error.
My code is like bellow
import com.comsol.model.*
import com.comsol.model.util.*
model=mphload('Rahman.mph'); %Rahman is the name of the model
info=mphsolinfo(model, 'solname', 'sol1');
tlist=info.solvals;
pd=mpheval(model, 'c'); % c is the dependent variable.
mphplot(model, 'pg1');
I would like to see the graph in matalb. But matlab is showing that there is an error in line mphplot.
Does anybody knoe how to use the mphplot command correctly?? Thanks in advance.