Export to Matlab - matlab.m hidden

Topics: 3.5a

Thread index  |  Previous thread  |  Next thread  |  Start a new discussion

RSS FeedRSS feed   |   Email notificationsTurn on email notifications   |   0 Replies   Last post: December 21, 2010 4:00pm UTC
Luiz Fernado

Luiz Fernado

December 21, 2010 4:00pm UTC

Export to Matlab - matlab.m hidden

Hi everybody,

I started to use matlab with COMSOL one year ago. I created a basic model with comsol using the GUI (see the attachement). Now I would like export this model to matlab. Here my steps :

1) - Open Comsol with Matlab ----->open My model----->File----->Export-----> Fem structure (by using the name 'TESTM');

2) -In matlab interface : 'TESTM'

I obtain :

***************************
version: [1x1 struct]
meshtime: 't'
appl: {[1x1 struct]}
geom: [1x1 solid2]
mesh: [1x1 femmesh]
sdim: {'x' 'y'}
frame: {'xy'}
shape: {'shlag(2,'u')'}
gporder: 4
cporder: 2
sshape: 2
simplify: 'on'
border: 1
form: 'coefficient'
units: [1x1 struct]
equ: [1x1 struct]
bnd: [1x1 struct]
pnt: [1x1 struct]
var: {}
expr: {}
draw: [1x1 struct]
const: {}
globalexpr: {}
functions: {}
solform: 'weak'
xmesh: [1x1 com.femlab.xmesh.Xmesh]
sol: [1x1 femsol]
**********************************************************

Unfortunately, I cannot edit the true matlab.m file corresponding to my initial model.mph. ! How retrieve this file, I mean the full matlab file.m ?

This file should be of the form :

***********
clear fem
fem.geom = square2(2,'pos',[-1 -1]) + circ2(0.4);
fem.mesh = ...
...
...
postsurf(fem,'u');

********

Thank you for your help

Luiz


Attachments:   TEST_COMSOL.zip  

Reply  |  Reply with Quote  |  Send private message  |  Report Abuse


Rules and guidelines