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.

Bezier Polygon Syntax

Please login with a confirmed email address before reporting spam

Hey all,

I have been trying to use the MATLAB livelink to alter the geometry for my model. I use MATLAB to do some calculations, then use those resulting values as coordinates in the new geometry. I tried to code a bezier curve, but I keep getting this error message:

Caused by: Exception:
com.comsol.util.exceptions.FlException: Dimension mismatch
Messages:
Dimension mismatch
- Parameter: p
- Parameter: degree

Here is my code:

model.geom('geom1').feature('b1').set('p', {'0' '0' '150' '150' '300' '300' '295' '290' '285' '280' '275' '270'
'265' '260' '255' '250' '245' '240' '235' '230' '225' '220' '215' '210' '205' '200' '195' '190' '185' '180'...
'175' '170' '165' '160' '155' '150' '145' '140' '135' '130' '125' '120' '115' '110' '105' '100' '95' '90'...
'85' '80' '75' '70' '65' '60' '55' '50' '45' '40' '35' '30' '25' '20' '15' '10' '5' '0' ;HH1...
'20' '20' '70' '70' HH61 HH60 HH59 HH58 HH57 HH56 HH55 HH54 HH53 HH52 HH51 HH50...
HH49 HH48 HH47 HH46 HH45 HH44 HH43 HH42 HH41 HH40 HH39 HH38 HH37 HH36 HH35 HH34 HH33 HH32 HH31 HH30 HH29 HH28 HH27 HH26 HH25 HH24 HH23 HH22 HH21 HH20 HH19 HH18 HH17 HH16 HH15 HH14 HH13 HH12 HH11 HH10 HH9 HH8 HH7 HH6 HH5 HH4 HH3 HH2 HH1});
model.geom('geom1').feature('b1').set('w', {'1' '1' '1' '1' '1' '1' '1' '1' '1' '1' '1' '1'...
'1' '1' '1' '1' '1' '1' '1' '1' '1' '1' '1' '1' '1' '1' '1' '1' '1' '1' '1' '1' '1' '1' '1' '1'...
'1' '1' '1' '1' '1' '1' '1' '1' '1' '1' '1' '1' '1' '1' '1' '1' '1' '1' '1' '1' '1' '1' '1' '1'...
'1' '1' '1' '1' '1' '1' '1' '1' '1' '1' '1' '1' '1' '1' '1' '1' '1' '1'...
'1' '1' '1' '1' '1' '1' '1' '1' '1' '1' '1' '1' '1' '1' '1' '1' '1' '1' '1' '1' '1' '1' '1' '1'...
'1' '1' '1' '1' '1' '1' '1' '1' '1' '1' '1' '1' '1' '1' '1' '1' '1' '1' '1' '1' '1' '1' '1' '1'...
'1' '1' '1' '1' '1' '1'});
model.geom('geom1').feature('b1').set('degree', {'1' '1' '1' '1' '1' '1' '1' '1' '1' '1' '1' '1'...
'1' '1' '1' '1' '1' '1' '1' '1' '1' '1' '1' '1' '1' '1' '1' '1' '1' '1' '1' '1' '1' '1' '1' '1'...
'1' '1' '1' '1' '1' '1' '1' '1' '1' '1' '1' '1' '1' '1' '1' '1' '1' '1' '1' '1' '1' '1' '1' '1'...
'1' '1' '1' '1' '1' '1'});

The HH__ characters represent the values that have been computed, and have been converted into strings. Does anyone know why I keep getting the above error message??

Any help would be greatly appreciated:)


0 Replies Last Post Sep 13, 2016, 2:53 p.m. EDT
COMSOL Moderator

Hello Amy Drexelius

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.