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.

Extracting graph data into a table/putting graph data into excel (5.3a)

Please login with a confirmed email address before reporting spam

Hi,

I'm completing an assignment for uni and struggling to extract the data from comsol to put into matlab

I've not used much of comsol, but i have this 1D point graph with two lines of data on, and would like to get this data into matlab to compare the two models. I had data from an eigenfrequency study which i was able to put into a table in comsol easily and just copied this into excel. However, I can't seem to do this again and not sure if it would only do it for these two points? (I have 11 points on my model).

I would also like to be able to save this graph as an image to use in my report and not sure how to do that either.

I'm hoping someone can understand what I'm trying to do! Any help appreciated :)

EDIT: I've worked out how to export the graph image, still nowhere with the numerical data i want.


1 Reply Last Post 9 mai 2018, 08:55 UTC−4
Lars Gregersen COMSOL Employee

Please login with a confirmed email address before reporting spam

Posted: 6 years ago 9 mai 2018, 08:55 UTC−4

Hi

This is really what LiveLink for Matlab is for.

If you have a plot I Comsol all you have to do in order to get the data into a Matlab variable is: pd = mphplot('pg1') and then the data will be in the pd variable.

If you don't have a plot you can use mphevalpoint to define the expressions and points directly and extract the data to Matlab.

If you don't have LiveLink for Matlab you can use the Comsol user interface by right clicking on the Point Graph node and select Add plot data to export. And then export the data to a file from the generated node under Export.

-------------------
Lars Gregersen
Comsol Denmark
Hi This is really what LiveLink for Matlab is for. If you have a plot I Comsol all you have to do in order to get the data into a Matlab variable is: pd = mphplot('pg1') and then the data will be in the pd variable. If you don't have a plot you can use mphevalpoint to define the expressions and points directly and extract the data to Matlab. If you don't have LiveLink for Matlab you can use the Comsol user interface by right clicking on the Point Graph node and select Add plot data to export. And then export the data to a file from the generated node under Export.

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.