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.

how to get data of table by matlab

Please login with a confirmed email address before reporting spam

Hi,

I want to get the data of table under the matlab environment. How can I do? What is the syntax?

Thank you!

2 Replies Last Post Jun 20, 2012, 5:22 a.m. EDT
COMSOL Moderator

Hello Noritaka Yusa

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: 1 decade ago Jul 28, 2011, 3:50 p.m. EDT
Thanks to Noritaka, here is one solution:

Here is a way to get the data of table under the matlab environment.
the syntax is "a=model.result.table('tbl1').getReal or b=model.result.table('tbl1').getImag"
here "a" and "b" are the variables of matlab which are defined by yourself.
The value of the table is a complex.


I also found out how to save a table as .txt or .xls files , namely:

model.result.table(minaTbl).save(['C:\...\comsolLivelink\' Tbl '.txt']);
model.result.table(minaTbl).save(['C:\...\comsolLivelink\' Tbl '.xls']);

Hope it helps.

Mina

Thanks to Noritaka, here is one solution: Here is a way to get the data of table under the matlab environment. the syntax is "a=model.result.table('tbl1').getReal or b=model.result.table('tbl1').getImag" here "a" and "b" are the variables of matlab which are defined by yourself. The value of the table is a complex. I also found out how to save a table as .txt or .xls files , namely: model.result.table(minaTbl).save(['C:\...\comsolLivelink\' Tbl '.txt']); model.result.table(minaTbl).save(['C:\...\comsolLivelink\' Tbl '.xls']); Hope it helps. Mina

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago Jun 20, 2012, 5:22 a.m. EDT
hello

i have the same problem but it's about the result ,thanksgiving
instead of having a table of 4 columns I found a table with two columns of false data as you can see in the atach file
hello i have the same problem but it's about the result ,thanksgiving instead of having a table of 4 columns I found a table with two columns of false data as you can see in the atach file

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.