Note: This discussion is about an older version of the COMSOL Multiphysics® software. The information provided may be out of date.

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.

Line of Best Fit

Please login with a confirmed email address before reporting spam

Hello All,

I was wondering if it is possible to fit a regression line to a log-log plot. (really I just need the slope of a log-log plot). Is there a way to do this in comsol, or do I have to export the data?

Thanks,
Aaron R. Shifman

4 Replies Last Post 23.01.2023, 17:00 GMT-5

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago 01.08.2014, 06:55 GMT-4
I think you will have to export it.
I think you will have to export it.

Jeff Hiller COMSOL Employee

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago 01.08.2014, 09:01 GMT-4
I can think of a way to do this by using the Optimization Module to perform a least square fit. Admittedly it's a bit of overkill.
I am attaching a simple example where the Optimization Module is used to find the best linear approximation to the temperature on the top surface of a square.
Jeff
I can think of a way to do this by using the Optimization Module to perform a least square fit. Admittedly it's a bit of overkill. I am attaching a simple example where the Optimization Module is used to find the best linear approximation to the temperature on the top surface of a square. Jeff


Please login with a confirmed email address before reporting spam

Posted: 1 decade ago 01.08.2014, 09:51 GMT-4
Hi Jeff,

Thanks for the input, unfortunately I don't have the optimization module, but I get the point nonetheless --not a "COMSOL friendly" task, I'll just export the data.

Thanks,
Aaron R. Shifman
Hi Jeff, Thanks for the input, unfortunately I don't have the optimization module, but I get the point nonetheless --not a "COMSOL friendly" task, I'll just export the data. Thanks, Aaron R. Shifman

Jeff Hiller COMSOL Employee

Please login with a confirmed email address before reporting spam

Posted: 2 years ago 23.01.2023, 17:00 GMT-5
Updated: 2 years ago 23.01.2023, 17:04 GMT-5

Too late for Aaron, but: Since the launch of COMSOL Multiphysics 6.1, there is a least square fit function available in the core package that could be used for this purpose. I think it was added more with idea that it will be used pre-processing data than for post-processing of results, but, hey, why not!

For those curious to learn more, see Reference Manual for COMSOL Multiphysics version 6.1, pages 356-357.

Jeff

-------------------
Jeff Hiller
Too late for Aaron, but: Since the launch of COMSOL Multiphysics 6.1, there is a least square fit function available in the core package that could be used for this purpose. I think it was added more with idea that it will be used pre-processing data than for post-processing of results, but, hey, why not! For those curious to learn more, see Reference Manual for COMSOL Multiphysics version 6.1, pages 356-357. Jeff

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.