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.

Extracting a table from a Comsol using Matlab livelink

Please login with a confirmed email address before reporting spam

Hello,
I am having troubles in accessing a table that is created in comsol model using matlab livelink. When I use this command

a = 120;
b = 100;
d = 100;
model = waterDropsInOil(a,b,d);
tabl = mphtable(model, 'tbl1');

tabl.data turns to be just a 1xN row matrix instead of being MxN matrix that I had in Comsol model.

tabl.data
ans =
45.7100 -0.0000 -0.0000 0.0000

Here I attach the Comsol model (www.dropbox.com/s/cjb353c0h5jx1rf/3WaterDropsInOil.mph) and its Matlab code (www.dropbox.com/s/9fs68wx1omslymp/waterDropsInOil.m).

Does anybody know what I am doing wrong please?

Thanks

1 Reply Last Post Dec 30, 2016, 12:06 p.m. EST
COMSOL Moderator

Hello Camille Girabawe

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.


Please login with a confirmed email address before reporting spam

Posted: 8 years ago Dec 30, 2016, 12:06 p.m. EST
Hi,
It seems to be an old post and you probably solved your problem already, but for those who are still working on it, you may want to try these following commands to get the table values

Tabl_real= model.result.table('tbl1').getReal;
Tabl_imag= model.result.table('tbl1').getImag;


Ngoc
Hi, It seems to be an old post and you probably solved your problem already, but for those who are still working on it, you may want to try these following commands to get the table values Tabl_real= model.result.table('tbl1').getReal; Tabl_imag= model.result.table('tbl1').getImag; Ngoc

Note that while COMSOL employees may participate in the discussion forum, COMSOL® software users who are on-subscription should submit their questions via the Support Center for a more comprehensive response from the Technical Support team.