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.

How can I plot a piecewise function after computing

Please login with a confirmed email address before reporting spam

Hi,

I am trying to use the time variable given by the solution (sol1.t or t) to define a variable theta=Dt/a^2 (other variables are defined) and plot i=f(theta) which is a piecewise function depending on the value of theta I dont know where I can define a new variable in the result section. I tried Results->Parameters, but it won't allow me to use t, I tried Results->Derived Values->Global Evaluation but it won't allow me to name this variable as theta, which makes me not able to refer to when calculating i. Also, in Results->1D Plot Group->Function How can I define a piecewise function here?

Many thanks!!!

Christopher


0 Replies Last Post 2023年5月5日 GMT-4 11:46
COMSOL Moderator

Hello Christopher Yi

Your Discussion has gone 30 days without a reply. If you still need help with COMSOL and have an on-subscription license, please visit our Support Center for help.

If you do not hold an on-subscription license, you may find an answer in another Discussion or in the Knowledge Base.

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.