tags:

views:

166

answers:

1

I'm writing a MATLAB script which solves for the eigenmodes of a defined polygon. MATLAB's PDE toolbox lets me define the geometry using the command pdepoly() but I need to export the geometry description matrix manually to the workspace through the GUI before I can decompose, mesh, and solve the pde. Does anyone know either a command to export the geometry to the workspace or a better way to define this geometry description matrix in MATLAB?

Many Thanks

A: 

I am a little confused about what you are trying to do. pdepoly(x,y) expects two vectors x and y already, so perhaps you can simultaneously return those vectors instead of trying to extract them again from the geometry created by pdepoly.

If you are trying to export the geometry from MATLAB so that you can use it elsewhere check this out: "[After calling pdepoly(x,y) t]he state of the Geometry Description matrix inside pdetool is updated to include the polygon. You can export the Geometry Description matrix from pdetool by using the Export Geometry Description option from the Draw menu." -http://www.mathworks.com/access/helpdesk/help/toolbox/pde/ug/pdepoly.html (15 March 2010)

That seems to sound like what you are up to. Best of luck!

James
Thanks for your speedy reply. Let me be more specific. I define a polygon using vectors of it's vertices. This is then drawn by pdepoly(x,y). I then need to decompose this geometry so that I can use pdetool meshing function. You can see a format flow chart here: http://www.mathworks.com/access/helpdesk/help/toolbox/pde/ug/bqivs1t-1.html The tutorial instructs me to export the Geometry Description matrix by going through the Draw menu. I can't use this method since my objective is to write a script which takes vertices and outputs the eigenmodes.
It would be great if there was a command which I could use to get this geometry description matrix simply by providing the vectors. If not then I'll need to construct this matrix with a custom function. When I peer into an exported CSG Model I can see the vectors along with a few other numbers. For instance using the vectors [-1;0;1],[-0.8;0.4;-0.8] I get the exported vectors: gd=[2;3;-1;0;1;-0.8;0.4;-0.8] ns=[80;49] sf='P1'Thanks again,-Lapwing

related questions