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.

3D plot from a used defined function

Please login with a confirmed email address before reporting spam

Hi!

I have made a function with two variables in my model, function(v1,v2). The function is based on interpolated data.
What is the easiest way to make a 3D plot of the data? I guess I should export the function to Comsol Script in some way?

/Nick

1 Reply Last Post Oct 30, 2009, 3:35 a.m. EDT
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 Oct 30, 2009, 3:35 a.m. EDT
Hi Niklas

if you read through the "mlinterface.pdf" comsol doc, you can find example how to access your functions in matlab in the comsol "fem.functions" structure (p22 and therafter) once introduced into matlab from the Comsol GUI with a CTRL-F.

There are also a few discussions in the forum that give you good clues how to access the named values within he structures, (try a search on the forum, not the full site, for "matlab" or "script".

If you come up with some nice matlab examples pls submit hem here so that we can build up some more "tricks"

Good luck
Ivar
Hi Niklas if you read through the "mlinterface.pdf" comsol doc, you can find example how to access your functions in matlab in the comsol "fem.functions" structure (p22 and therafter) once introduced into matlab from the Comsol GUI with a CTRL-F. There are also a few discussions in the forum that give you good clues how to access the named values within he structures, (try a search on the forum, not the full site, for "matlab" or "script". If you come up with some nice matlab examples pls submit hem here so that we can build up some more "tricks" Good luck Ivar

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.