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.

Error while using Matlab LiveLink

Please login with a confirmed email address before reporting spam

I'm facing a problem while using Matlab LiveLink.

--------------------------------------------------------------------------
geom1 = model.geom.create('geom1', 2);

c1 = geom1.create('c1', 'Circle');
c1.label('c1')
c1.set('r', '40');

c2 = geom1.create('c2', 'Circle');
c2.label('c2');
c2.set('r', '20');

dif1 = geom1.create('dif1', 'Difference');
dif1.selection('input').set(c1.label);
dif1.selction('input2').set(c2.label);
--------------------------------------------------------------------------

The code above gave the following error.

--------------------------------------------------------------------------
No method 'set' with matching signature found for class 'com.comsol.clientapi.impl.LocalGeomObjectSelectionClient'.

Error in
dif1.selection('input').set(c1.label);
--------------------------------------------------------------------------

Could anyone explain why this is happening?

2 Replies Last Post 18 avr. 2016, 04:01 UTC−4

Please login with a confirmed email address before reporting spam

Posted: 8 years ago 17 avr. 2016, 22:06 UTC−4
Hi, Harutaka:
If you input like this, it might work:
dif1.selection('input').set({'c1'});
dif1.selction('input2').set({'c2'});
I'm running into the same error while I'm trying to change the {index} into domain number, but it never work and I don't know why. If you know something about this, please tell me, thanks.
Hi, Harutaka: If you input like this, it might work: dif1.selection('input').set({'c1'}); dif1.selction('input2').set({'c2'}); I'm running into the same error while I'm trying to change the {index} into domain number, but it never work and I don't know why. If you know something about this, please tell me, thanks.

Please login with a confirmed email address before reporting spam

Posted: 8 years ago 18 avr. 2016, 04:01 UTC−4
Thank you for your reply, Yang.

I tried what you suggested and it worked.
I have no idea why "dif1.selection('input').set" doesn't take "c1.label" as an argument.
Thank you for your reply, Yang. I tried what you suggested and it worked. I have no idea why "dif1.selection('input').set" doesn't take "c1.label" as an argument.

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.