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

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 Jan 23, 2023, 5:00 p.m. EST

Please login with a confirmed email address before reporting spam

Posted: 8 years ago Aug 1, 2014, 6:55 a.m. EDT
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: 8 years ago Aug 1, 2014, 9:01 a.m. EDT
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: 8 years ago Aug 1, 2014, 9:51 a.m. EDT
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: 6 days ago Jan 23, 2023, 5:00 p.m. EST
Updated: 6 days ago Jan 23, 2023, 5:04 p.m. EST

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

Reply

Please read the discussion forum rules before posting.

Please log in to post a reply.

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.