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 cell from a table in line integration

Please login with a confirmed email address before reporting spam

Hi,
I am using line integration feature in the COMSOL 4.2 through MATLAB and I need to obtain 1 of the numbers stored in one of the cells of a table after I evaluate a boundary expression. This is the code that does the line integration.

model.result.numerical.create('int1', 'IntLine');
model.result.numerical('int1').set('innerinput', 'last');
model.result.numerical('int1').selection.set([2]);
model.result.numerical('int1').set('expr', '(2*pi*r*cs)/(pi*0.002^2*4.9817e-8)');
model.result.table.create('tbl1', 'Table');
model.result.table('tbl1').comments('Line Integration 1 ((2*pi*r*cs)/(pi*0.002^2*4.9817e-8))');
model.result.numerical('int1').set('table', 'tbl1');
model.result.numerical('int1').setResult;

In the COMSOL GUI, the result of this integration is 2x2 matrix like this:

Time Expression
3600 1.0046

I just need a command to extract that 1.0046 number in the MATLAB interface.
Thanks in advance.

0 Replies Last Post 19 giu 2012, 12:12 GMT-4
COMSOL Moderator

Hello Rajjeet Phull

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.

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.