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.

Where do I type these commands

Please login with a confirmed email address before reporting spam

Hi,

I've often seen (both in COMSOL doc as well as on this forum) codes like the one below (just a sample).

p = (peaks+7)*5;
figure
image(p)
v = axis;
c = flim2curve(p,{[],[5:5:75]});
g = geomcsg({rect2(5,45,0,50)},{c});
s = solid2(g);

I believe these should be typed out at some command prompt, but where, I have no idea. Could somebody please shed some light on this. I need to use the function "flim2curve" on a COMSOL result after post processing to create geometries.

Thanks in advance,

Harish

4 Replies Last Post 20 set 2010, 10:03 GMT-4

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago 18 set 2010, 10:29 GMT-4

Hi,

I've often seen (both in COMSOL doc as well as on this forum) codes like the one below (just a sample).

p = (peaks+7)*5;
figure
image(p)
v = axis;
c = flim2curve(p,{[],[5:5:75]});
g = geomcsg({rect2(5,45,0,50)},{c});
s = solid2(g);

I believe these should be typed out at some command prompt, but where, I have no idea. Could somebody please shed some light on this. I need to use the function "flim2curve" on a COMSOL result after post processing to create geometries.

Thanks in advance,

Harish


These are matlab codes, which you can run in combination with Comsol. Try searching for matlab in the documentation or here.
[QUOTE] Hi, I've often seen (both in COMSOL doc as well as on this forum) codes like the one below (just a sample). p = (peaks+7)*5; figure image(p) v = axis; c = flim2curve(p,{[],[5:5:75]}); g = geomcsg({rect2(5,45,0,50)},{c}); s = solid2(g); I believe these should be typed out at some command prompt, but where, I have no idea. Could somebody please shed some light on this. I need to use the function "flim2curve" on a COMSOL result after post processing to create geometries. Thanks in advance, Harish [/QUOTE] These are matlab codes, which you can run in combination with Comsol. Try searching for matlab in the documentation or here.

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago 18 set 2010, 10:40 GMT-4
Thanks Danial.

I tried running COMSOL with MATLAB. At first it couldn't find MATLAB installed in it at all. Later I updated the COMSOL.opt file to read the MATLAB root directory.

Now when I try opening MATLAB from COMSOL, it opens it successfully but I get the following msg in MATLAB

' ??? Undefined function or method 'comsolmexpath' for input
arguments of type 'char'.

A few minutes later, COMSOL pops up a msg saying timed out.....

Any Idea on how could I setup up the link correctly?

Thanks,
Harish
Thanks Danial. I tried running COMSOL with MATLAB. At first it couldn't find MATLAB installed in it at all. Later I updated the COMSOL.opt file to read the MATLAB root directory. Now when I try opening MATLAB from COMSOL, it opens it successfully but I get the following msg in MATLAB ' ??? Undefined function or method 'comsolmexpath' for input arguments of type 'char'. A few minutes later, COMSOL pops up a msg saying timed out..... Any Idea on how could I setup up the link correctly? Thanks, Harish

Ivar KJELBERG COMSOL Multiphysics(r) fan, retired, former "Senior Expert" at CSEM SA (CH)

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago 19 set 2010, 05:16 GMT-4
Hi
Looks like yopur path link matlab COMSOL is not fully set-up, have you checked the KB ? there are a few reports about how to check maually these settings

--
Good luck
Ivar
Hi Looks like yopur path link matlab COMSOL is not fully set-up, have you checked the KB ? there are a few reports about how to check maually these settings -- Good luck Ivar

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago 20 set 2010, 10:03 GMT-4
Hi,
I had the same problem. You have to reinstall Comsol by correctly specifing the Matlab directory from the beginning. This will add a folder in the Matlab directory, where Comsol will put its own files.

Alois
Hi, I had the same problem. You have to reinstall Comsol by correctly specifing the Matlab directory from the beginning. This will add a folder in the Matlab directory, where Comsol will put its own files. Alois

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.