How to extract data from Layered Shell dataset to matlab

Please login with a confirmed email address before reporting spam

The mpheval and mphinterp functions fail to extract localized variables (such as r_llmat1_xdim) when querying standard evaluation datasets directly in memory. I need help on how to export this data into MATLAB. lshl1_eval = mpheval(model, {'T'}, 'dataset', 'lshl1'); 错误使用 mpheval mpheval (0): Java exception occurred: Exception: com.comsol.util.exceptions.FlException: 数据集类型无效。 Messages: 数据集类型无效。 - 标记: lshl1

lshl1_eval = mpheval(model, {'T','r','r_llmat1_xdim'}, 'dataset', 'dset1', 'selection', 3, 'edim', 1);

错误使用 mpheval mpheval (0): Java exception occurred: Exception: com.comsol.util.exceptions.FlException: 无法计算表达式。 Messages: 无法计算表达式。

未定义变量。
- 变量: r_llmat1_xdim
- 几何: geom1
- 边界: 3

无法计算表达式。
- 表达式: 1000*r_llmat1_xdim
- 特征: 计算

3 Replies Last Post 2026年10月6日 GMT+2 12:14
Lars Gregersen COMSOL Employee

Please login with a confirmed email address before reporting spam

Posted: 1 month ago 2026年9月1日 GMT+2 13:17
Updated: 1 month ago 2026年9月1日 GMT+2 14:36

Hi 浩

mpheval doesn't work for extra dimensions dataset.

This should work:

dset1_eval = mpheval(model, {'T' 'r' 'z'},'dataset','dset1')

and you can add more properties to refine the extraction:

dset1_eval = mpheval(model, {'T' 'r' 'z'},'dataset','dset1','edim',1,'selection',4)

For the xtra dimensions you can use mphinterp:

[lT,lr,lrx]=mphinterp(model, {'T' 'r' 'r_llmat1_xdim'},'dataset','lshl1');

I hope this helps. If not, then please write again.

-------------------
Lars Gregersen
Comsol Denmark
Hi 浩 mpheval doesn't work for extra dimensions dataset. This should work: dset1_eval = mpheval(model, {'T' 'r' 'z'},'dataset','dset1') and you can add more properties to refine the extraction: dset1_eval = mpheval(model, {'T' 'r' 'z'},'dataset','dset1','edim',1,'selection',4) For the xtra dimensions you can use mphinterp: [lT,lr,lrx]=mphinterp(model, {'T' 'r' 'r_llmat1_xdim'},'dataset','lshl1'); I hope this helps. If not, then please write again.

Please login with a confirmed email address before reporting spam

Posted: 1 month ago 2026年9月2日 GMT+2 08:46

It worked! Thank you so much; this problem had been bothering me for a long time.

It worked! Thank you so much; this problem had been bothering me for a long time.

Please login with a confirmed email address before reporting spam

Posted: 2 hours ago 2026年10月6日 GMT+2 12:14

It worked! Thank you so much; this problem had been bothering me for a long time.

Complements, Dave Do you have a necessity for custom financing for expansion, working capital, and refinancing?

Best Regards, Assistant Business Consultant, At Veoci - 195 Church Street, 14th Floor New Haven, CT 06510 +1 480 882-8686

>It worked! Thank you so much; this problem had been bothering me for a long time. Complements, Dave Do you have a necessity for custom financing for expansion, working capital, and refinancing? Best Regards, Assistant Business Consultant, At Veoci - 195 Church Street, 14th Floor New Haven, CT 06510 +1 480 882-8686

Reply

Please read the discussion forum rules before posting.

Please log in to post a reply.

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.