majd

5 Reputation

3 Badges

14 years, 7 days

MaplePrimes Activity


These are questions asked by majd

using worksheet mode, is there a way to automatically color any comments after (#) with a different color than the default red?

I have been using Maple for years and did not need to significantly document or comment on my worksheets before because I only needed to share my worksheets with close collegues who have a lot of experience with Maple too. However, now I need to share my code with a general audience that might not be a Maple user. So I need to add enough comments after each line, and I have been manually changing the color of comments after the # to green to give the reader the indication that this is a comment and not part of the code, like this for example:

 

restart;

f:=(x,y)->sin(sqrt(x^2+y^2))/sqrt(x^2+y^2); # Define f as a function of the variables x and y

proc (x, y) options operator, arrow; sin(sqrt(x^2+y^2))/sqrt(x^2+y^2) end proc

(1)

df:=(x,y)->eval(diff(f(a,y),a),a=x); # Define df as the partial derivative of f with respect to x

proc (x, y) options operator, arrow; eval(diff(f(a, y), a), a = x) end proc

(2)

df(1,3); # Evaluate df at x=1, y=3

(1/10)*cos(10^(1/2))-(1/100)*sin(10^(1/2))*10^(1/2)

(3)

 

 

Download Worksheet-coloring-comments.mw



It would be great if Maple can automatically color comments like typical editors do. Is this possible? if not, does anyone have an advice for a nice easy way to add proper documentation to worksheets?

In a related question to this answer (http://www.mapleprimes.com/questions/129140-Surface-Fitting#comment129195). How can we take partial derivatives of the multivariable fitting function (in the example above, the function B(a,b)?
It seems like the package CurveFitting only allows to numerically evaluate the fitted function when we use ArrayInterpolation, but I assume deep in the code there must be an analytic ...

I am facing a problem dsolve/numeric, and I am attaching two files: dsolve-issue.mws and dsolve-issue2.mws the first one shows a simplified version of the problem, the second one is an actual example of one the DE systems I desperately need to solve. There are brief comments in the files describing the problem, but here is the summary:

I am trying to plot a vector field with fieldplot, but the vector field components contain a numerical integration (i.e. evalf(Int(...,...)). However, maple refuses to plot it, and gives me this error mesasge

"Error, (in plots/fieldplot) no non-zero vectors found"

maple has no problem evaluation the vector field at any value of x, and y, and takes only a fraction of a second for each point. However, if i change the integral inside the vector field components to int(...

Page 1 of 1