Transfer Geometry from Grasshopper to Matlab

Hello Everyone!
I’m working on a specific geometry created on Grasshopper.
In the meantime, I’ve developed a MATLAB Code (.m) for shape optimization.
How can I use the geometry created in Gh and import it on Matlab? There is some way? For example, using C#.

Thanks a lot.

L.

Check this may help you

1 Like

Hi, check nuget to get various matfile wrapper. This way you can interchange data with matfiles. Please note they only support an older Matfiles format. You can also export as csv or text file and import in matlab, see @anon39580149 provided link. The pro-solution is via interprocess communication. Matlab allows to deal with dotnet objects. This way you can create a C# middleware which interchanges data between Matlab and Rhino/GH in a client-server manner. This however requires an advanced understanding of programming, but also gives the highest degree of freedom and automatisation.

1 Like

Thank you so much!