5 Reputation

One Badge

0 years, 322 days

MaplePrimes Activity

These are questions asked by CJBriggs


I was wondering someone could help me with something.

Basically I've got a function of f(x,z) that I have plotted which comes from an integration that was taken over a large number of small steps. I have been able to plot this function to determine a Potential Field as a function of x and z. (No Problems so far)

However the next step that I want to be able to do is compute a field form this potential. apologies for my lack of knowing how to input into here as I am fairly new to this. To do this I have:

Field = - Nabla * Potential 

Again no problem, I can plot a gradient field from it which is great using the gradplot command. I beleive this comes as a result of the following:

gradplot = [diff(f,x), diff(f,z)]

HOWEVER I want to be able to plot a Field Strength plot (In essence a Gradient Field Strength) where it takes the magnitude of the vectors at each point. Firstly am I correct in saying that this should be:

Magnitude Field = |F| = sqrt( Fx^2+Fz^2)      where Fx is diff(f,x) and Fz is diff(f,z)


However when I try to compute this, it takes an age to evaluate and doesn't seem to make much progress. I think this may come as a result of computing square roots of large numbers/large decimal places? I was wondering whether there is any command that anyones knows of that would calculate Gradient Field Strength/Magnitude that may solve this issue? Or even who to just compute this Square root?


I was wondering whether anyone could help me. I am trying to plot a large number of functions on the same graph and am struggling with a way of inputting this without having to manually enter each.


Basically, I have a for do loop that runs from i being 0 to n. Within the loop, it takes a[i] = some function of my variables so in essence I have n functions that I would like to plot on the same graph. Currently I'm working with a low number for n to make sure that the code is running how I want it to, however I'm looking to increase my n number significantly which will obviously mean I have a significant number of functions.

I am using:

plot3d({a[0], a[1], a[2], a[3], a[4], a[5], a[6], a[7], a[8], a[9], a[10], a[11], a[12], a[13], a[14], a[15], a[16], a[17], a[18], a[19], a[20]}, z = 0 .. m, x = -M .. M, lightmodel = none, orientation = [180, 0, 180], style = surfacecontour, shading = zhue)

to plot my functions however I don't want to have write out each of the a[ ] when increasing this n value. So I was wondering whether anyone has any ideas how to write this in a shorter form?

I hope that makes sense and any help would be greatly appreciated.

Page 1 of 1