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.

Import geometry from Matlab into Comsol

Please login with a confirmed email address before reporting spam

Hello,


First of all, I want to emphasize that I am a beginner with Comsol.

I am trying to import a geometry generated with Matlab into Comsol in order to study the wave propagation in this geometry.

My geometry is simply a n*n matrix, with 2 values : 0 and 1. The value 1 is the material and the value 0 is the air inside the material.

How can I import this matrix into Comsol to work with ?

Thank you for helping out.

2 Replies Last Post 2013年2月5日 GMT-5 15:14
COMSOL Moderator

Hello Olivier Mesnil

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.


Saeid Norouzi Apourvari

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago 2013年1月29日 GMT-5 20:57
Hi Oliver,

I had the same problem as you have and I did onething which I beleive is not the right way but worked. What I did, I visualized the 2D structure in MATLAB using "imagsc" command and then saved the figure as .png file. Then I used an online converter to convert the .png image into the .dxf format which is acceptable by COMSOL.

Hope this helps you,

Good luck,
saeid
Hi Oliver, I had the same problem as you have and I did onething which I beleive is not the right way but worked. What I did, I visualized the 2D structure in MATLAB using "imagsc" command and then saved the figure as .png file. Then I used an online converter to convert the .png image into the .dxf format which is acceptable by COMSOL. Hope this helps you, Good luck, saeid

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago 2013年2月5日 GMT-5 15:14

Hi Oliver,

I had the same problem as you have and I did onething which I beleive is not the right way but worked. What I did, I visualized the 2D structure in MATLAB using "imagsc" command and then saved the figure as .png file. Then I used an online converter to convert the .png image into the .dxf format which is acceptable by COMSOL.

Hope this helps you,

Good luck,
saeid


Hi Saeid,

Thank you for this answer ! I had lost hope to do it by this way but actually it works !

Thank you again.

Olivier.
[QUOTE] Hi Oliver, I had the same problem as you have and I did onething which I beleive is not the right way but worked. What I did, I visualized the 2D structure in MATLAB using "imagsc" command and then saved the figure as .png file. Then I used an online converter to convert the .png image into the .dxf format which is acceptable by COMSOL. Hope this helps you, Good luck, saeid [/QUOTE] Hi Saeid, Thank you for this answer ! I had lost hope to do it by this way but actually it works ! Thank you again. Olivier.

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.