Manipulate 1D line plot

Please login with a confirmed email address before reporting spam

I have a solution of y and x as a function of time.

I want to shift the values of y by subtracting it with the first value in the array of y, and then perform of 1D line plot.

Is there a syntax to write it COMSOL like "y - y(1,1)"?

Any help or suggestion.

Thank you

PS: I can export the data and then plot in MATLAB but I want to do it in COMSOL


1 Reply Last Post 15.12.2024, 11:38 GMT-5
Acculution ApS Certified Consultant

Please login with a confirmed email address before reporting spam

Posted: 1 week ago 15.12.2024, 11:38 GMT-5

Oh yes, see https://www.comsol.com/support/learning-center/article/Examples-of-the-withsol-Operator-33781:

y-withsol('sol1',y,setind(t,1))

is a general form, such that you could not only subtract a value from your first solution (here assumed to be called 'sol1', but check), but from other studies too. This extracts the first time indexed value of y. Try it out...

-------------------
René Christensen, PhD
Acculution ApS
www.acculution.com
info@acculution.com
Oh yes, see https://www.comsol.com/support/learning-center/article/Examples-of-the-withsol-Operator-33781: y-withsol('sol1',y,setind(t,1)) is a general form, such that you could not only subtract a value from your first solution (here assumed to be called 'sol1', but check), but from other studies too. This extracts the first time indexed value of y. Try it out...

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.