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.

Problem with plotting derivative

Please login with a confirmed email address before reporting spam

Hi!

I have following problem. By using Magnetic Fields(mf) I am simulating magnetic fields for certain current coil(s) configuration. After that I am using 1D plot group and consequently line graph for plotting. I am trying to plot following quantity: d/dx(atan(Bz / Bx)) vs x for y = z = 0. For that I am assigning y axis following formula: d(atan(mf.Bz / mf.Bx), x) that returns me 0 value.

Is there some intermediate steps where I have to explicitly assign some expression as a function of x in order for derivative to not end up being 0? How else can I manage calculating derivatives?

Thank you


1 Reply Last Post Oct 4, 2023, 8:14 a.m. EDT
Magnus Olsson COMSOL Employee

Please login with a confirmed email address before reporting spam

Posted: 1 year ago Oct 4, 2023, 8:14 a.m. EDT
Updated: 1 year ago Oct 4, 2023, 9:09 a.m. EDT

This is a common question that is addressed in one of our blogs, see:

https://www.comsol.com/blogs/plotting-spatial-derivatives-magnetic-field

-------------------
Magnus
This is a common question that is addressed in one of our blogs, see:

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.