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.

matlab loops

Please login with a confirmed email address before reporting spam

Hi,
I am modeling a train of pulse (using bioheat and electric currents) and I want to do it with loops becuase the pulses are very short and the intervals relativly long, I run one pulse and than I want to use the solution (V and T) as the initial conditions for the interval and so on. I save the solution vectors but I don't know how to use them again as parameters for the next step as the parameters require strings.
please help me or tell me if there is a better way to do it. I need to run 270 pulses of 50microsecond with 1second interval

Thanks
Shirley

1 Reply Last Post 2012年7月17日 GMT-4 03:03

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago 2012年7月17日 GMT-4 03:03
What I would try to do is start with a first study for one pulse, then create a second study and tell it to use the first study's results as inital condition. This is built-in functionality, you can try it out in the GUI. In your Matlab loop, you can then either create a study for each pulse, or, if you're only interested in the timeseries' final result, you could have but one study that keeps using its own solution as initial condition and that you update and re-run in each iteration.
What I would try to do is start with a first study for one pulse, then create a second study and tell it to use the first study's results as inital condition. This is built-in functionality, you can try it out in the GUI. In your Matlab loop, you can then either create a study for each pulse, or, if you're only interested in the timeseries' final result, you could have but one study that keeps using its own solution as initial condition and that you update and re-run in each iteration.

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.