Import a matlab file in comsol

In summary, the conversation discussed the issue of importing a text file into Comsol to create a 3D geometry. It was suggested to use a "geometry object" in Comsol, and possibly use Matlab to create the geometry. Another option was to use a CAD program like Solidworks. One person mentioned using Maple13 and exporting a picture as a .dxf file, but there were concerns about converting 3D geometry into 2D.
  • #1
nostris
1
0
Hello,
I have a file with points and I want to create a 3D geometry in Comsol, but it's impossible to load a txt file in this software.
In Comsol we can import something called "geometry object" and I know it's possible to create this geometry with Matlab but I don't know how to do.
Can someone help me ?
 
Physics news on Phys.org
  • #2
hi,
I want to do the same thing but can't figure out how...
did you find a solution? if so could you help me please?
thanks
 
  • #3
Importing stuff into comsol is all about formatting. Just draw something in COMSOL, then export it. Using the same format of the file you exported just copy and paste your MATLAB data into it.

FYI, if your just importing geometry into comsol, its a LOT easier just to do it with a CAD program like solidworks.
 
  • #4
hey guys,

try to use maple13 to creare geometry.. then export picture as .dxf (drawing exchange format)

COMSOL can read .dxf geometry BUT in my case it covert 3d geom into 2d..

if anybody know how to treat it, please let me know.
 

Related to Import a matlab file in comsol

1. How do I import a Matlab file into Comsol?

To import a Matlab file into Comsol, go to the "File" menu and select "Import". Then, choose the Matlab file you want to import and click "Open". The file will be imported into Comsol as a new data set.

2. Can I import a specific variable from a Matlab file into Comsol?

Yes, you can import a specific variable from a Matlab file into Comsol by clicking on the "Advanced" button in the import window. Then, select the variable you want to import from the list and click "Import".

3. What file formats can be imported from Matlab to Comsol?

Comsol can import data from Matlab files with the following extensions: .mat, .fig, .m, .p, .mat5, .mat7, .mat73, .mat74, .fig5, .fig7, .fig73, .fig74, .m5, .m7, .m73, and .m74.

4. Can I edit the imported Matlab data in Comsol?

Yes, once the Matlab file is imported into Comsol, you can edit the data by right-clicking on the imported data set and selecting "Edit". This will open the data editor where you can make changes to the data.

5. How can I use the imported Matlab data in my Comsol model?

The imported Matlab data can be used in your Comsol model by selecting it as a data source in the settings of a model feature. You can also use the data in equations and expressions in your model by referencing the imported data set.

Similar threads

  • MATLAB, Maple, Mathematica, LaTeX
Replies
1
Views
1K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
3
Views
2K
Replies
3
Views
1K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
1
Views
3K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
5
Views
2K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
6
Views
1K
  • Mechanical Engineering
Replies
8
Views
2K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
3
Views
1K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
2
Views
1K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
3
Views
162
Back
Top