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.

mphglobal with Matlab returning multiple values

Please login with a confirmed email address before reporting spam

Hi there,
I was using mphglobal successfully to pull parameters from my comsol model but now I have an issue. I made some changes to my model such as changing the mesh and adding some more variables and now when I try to pull out parameters with mphglobal it will return the value 41 times. So instead of returning a double, it returns a 41x1 array of identical doubles. Any idea what is going on?

Thanks,
Bryan

1 Reply Last Post 15 mars 2017, 05:51 UTC−4
Lars Gregersen COMSOL Employee

Please login with a confirmed email address before reporting spam

Posted: 7 years ago 15 mars 2017, 05:51 UTC−4
Hi

If you have a time dependent model or a model that has a parametric sweep your global variables can take different values for different times/parameter values. I assume that is the case for your model.

You can use the function mphsolinfo to get information about the number of steps in your solutions.


--
Lars Gregersen
Comsol Denmark


Hi there,
I was using mphglobal successfully to pull parameters from my comsol model but now I have an issue. I made some changes to my model such as changing the mesh and adding some more variables and now when I try to pull out parameters with mphglobal it will return the value 41 times. So instead of returning a double, it returns a 41x1 array of identical doubles. Any idea what is going on?

Thanks,
Bryan



Hi If you have a time dependent model or a model that has a parametric sweep your global variables can take different values for different times/parameter values. I assume that is the case for your model. You can use the function mphsolinfo to get information about the number of steps in your solutions. -- Lars Gregersen Comsol Denmark [QUOTE] Hi there, I was using mphglobal successfully to pull parameters from my comsol model but now I have an issue. I made some changes to my model such as changing the mesh and adding some more variables and now when I try to pull out parameters with mphglobal it will return the value 41 times. So instead of returning a double, it returns a 41x1 array of identical doubles. Any idea what is going on? Thanks, Bryan [/QUOTE]

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.