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 04.10.2023, 08:14 GMT-4
Magnus Olsson COMSOL Employee

Please login with a confirmed email address before reporting spam

Posted: 7 months ago 04.10.2023, 08:14 GMT-4
Updated: 7 months ago 04.10.2023, 09:09 GMT-4

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.