Clare So

165 Reputation

8 Badges

11 years, 344 days
Waterloo, Ontario, Canada

I was a software developer in Math and Research groups in 2007-2012.  I reviewed most of the contributions from Maplesoft's academic research labs.  In addition, I was one of the maintainers of the math library in Maple.  My involvement in Maple started in my undergraduate career when I worked at one of Maplesoft's affiliated academic research labs.

I hold BSc and MSc degrees in Computer Science from The University of Western Ontario, London, Canada.

My public LinkedIn profile: http://ca.linkedin.com/in/claremso

MaplePrimes Activity


These are answers submitted by Clare So

It would be better if you can post a snippet of your code.  What you've described sounds like you're doing some numeric operations. Please check out ?NumericEventHandler.  You can override the default behaviour of these "numeric events" such as division by zero.

Hope this helps.

Could you please paste the commands as text if possible?  The images consist of broken URLs.  Thanks.

Maple was first released non-commerically in the early 1980s. Here's a description of Maple's early history: http://www.scg.uwaterloo.ca/history

Although the matrices M1 and M2 in my example contain the same entries, but they are stored in different location in memory.  The command "addressof" finds out where the expression is stored. verify/Matrix is the verify command for matrices.

> M1:=Matrix([[1,0],[0,1]]):
> M2:=Matrix([[1,0],[0,1]]):
> verify(M1,M2,{'equal'});
                                     false

> evalb(M1=M2);
                                     false

> M1-M2;
                                   [0    0]
                                   [      ]
                                   [0    0]

> verify(M1,M2,Matrix);
                                     true

> addressof(M1);
                                   147693376

> addressof(M2);
                                   147693440

P.S.Your use of evalb and `=` works for the math expressions that are stored in the same address.

> expr1:=diff(x^2,x);
                                 expr1 := 2 x

> expr2:=diff(x^2,x);
                                 expr2 := 2 x

> evalb(expr1=expr2);
                                     true

> addressof(expr1); 
                                   150239124

> addressof(expr2);
                                   150239124

Hope this helps

You may want to save your large expressions into a Maple archive instead of export them as MathML.  See LibraryTools[Save] help page:

http://www.maplesoft.com/support/help/Maple/view.aspx?path=LibraryTools%2fSave

Could you please tell us the input that broke the kernel?  Perhaps I can find someone to help you.

Hope this helps.

 

You can count the occurrences of yes and no using ListTools[Occurrences] before calling Statistics[PieChart] and Statistics[BarChart].  There's no need to convert y to 1 and n to 0.

ans := [y, y, n, n, n, y, y, n, n, n, y, y]:
data := ['y' = ListTools:-Occurrences('y', ans), 'n' = ListTools:-Occurrences('n', ans)]:
Statistics:-PieChart(data);
Statistics:-BarChart(data);

This bug has been filed.  Thanks for reporting.

Would Student[Calculus1][ExtremePoints] help you to find the minimum and maximum values? Note that the code below finds the local minimum and maximum, as well as the minimum and maximum within the interval.

> with(Student[Calculus1]):
> ExtremePoints(1 + x^4 - 3*x^2,x=-1..2);
                                     1/2
                                    6
                            [-1, 0, ----, 2]
                                     2

> min(%);
                                   -1

> max(%%);
                                    2

>

Student[Calculus1][FunctionAverage] calculates the average value of a function within the interval:

> with(Student[Calculus1]):
> FunctionAverage(1 + x^4 - 3*x^2,x=-1..2);
                                   1/5

Hope this helps.

How about display(seq(c[k], k=1..i))?  Hope this helps.

If you have Maple 15, you can try plottools[getdata]:

p:= dsolve({D(y)(x) = y(x), y(0)=1}, numeric, output=Array([-1,-0.8,-0.6,-0.4,-0.2,0])):
myplot := plots[odeplot](p):
plottools[getdata](myplot, "curve")[-1];

Please note that plottools[getdata] does not only work in odeplots but other plots as well.

Hope this helps.

with(Student[Calculus1]):

DerivativePlot(sin(x),x=0..2*Pi);

@Preben Note that the following works, too.

> f := m -> m^2:
> x := i -> i^2:
> sum(x(m), m=1..3);
                                                14

You can construct multiple plot objects and display them on the same graph by plot[display]. Here is an example:

with(plots):
g1 := listplot3d([[1, 2], [3, 4], [5, 6], [7, 8]], color = red):
g2 := listplot3d([[-1, -2], [-3, -4], [-5, -6], [-7, -8]], color = blue):
display(g1, g2);

See my post Plotting Pacman for another example of putting multiple plots on the same graph.

"showstat" prints the code of Maple commands with their line numbers.  See ?showstat for more details.

Hope this helps

I think you can use "if" instead of "piecewise":

h:=x->sqrt(x):
g:=x->`if`(h(x)<>real,0,h(x));

Hope this helps.

1 2 Page 1 of 2