## 6071 Reputation

15 years, 215 days

## What is x\$0 ?...

We know that the expression x\$3 expands to x,x,x.  But what does x\$0 expand to?  Nothing!  So your code runs into a problem in the k=0 case.  To fix, put the x\$k inside a list, as in
`diff(f(x), [x\$k]);By the way, don't use "D" for a variable name.  In Maple D is the differntiation operator.`

## The Maple equivalent of your Matlab code...

The Maple equivalent of your Matlab code is:

` for i from 1 to 5 do  for j from 1 to 5 do    M[i,j] := i + j;  end do;end do; `

Let's say you put that in a file named tryme.maple.  Then read that file by entering the following command in Maple:

`read "tryme.maple";`

## what are x0, y0?...

You have

d := plots[pointplot]([x0, y0]);

but you haven't said what x0 and y0 are.

## View...

Let's say you want the z axis to go from zmin to zmax.  Then give the plotting option view=zmin..zmax.

## Why display?...

I don't see why you would want to insist on using display() when there is no need for it.

Here is a slightly different way of doing your plots, without the help of the plots package, and without display():

for i from 1 to 5 do
plot([sin(a[i]*x), sin(a[i+1]*x)], x=-2..2, -2..2, color=["Red","Green"],
legend=[typeset("Curve1:",sin(a[i]*x)), typeset("Curve2:",sin(a[i+1]*x))]
);
end do;

## !!!...

Push the "!!!" button.

## It depends......

Why do you limit yourself to ".jpg" and ".png"?  If it is for publication in a journal or a book, you (and your publisher) will want the image in the ".eps" (Encapsulated Postscript) format which is "high resolution" by default.  In fact, "high resolution" makes no sense in EPS since it is a vector image format which maintaions100% accuracy at any magnification.

## Use icons...

I am not aware of keyboard shortcuts for zoom and pan.  As you have observed, you may do them through the drop-down menu.  A quicker way is to use the icons that appear along the top toolbar.  Here is a screenshot:

Click on the red icon to zoom, the blue icon to pan.

## Use abs()...

Maple is cautious with fractional powers since a fractional power of a complex number is multivalued in general.  To reassure Maple of your intent, apply abs() to y(x), as in

de := diff(y(x),x) = 3*abs(y(x))^(2/3);

## Need to get the syntax right...

1. In mathematical formulas the parenteses (), brackets [], and braces {} tend to be used interchangeably, but in Maple they have quite distinct meanings.  Go through your worksheet and replace all [] and {} with ().

2. The Maple syntax for defining a function like f(x,y) = x^2 + y^2 is

f := (x,y) -> x^2 + y^2

You seem to use the notation

f(x,y) := x^2 + y^2

which is incorrect.  Go through your worksheet and fix those as well.

3. Your equations contain a parameter Gr sub zero, but you have given a numerical value to Gr without the sub zero.  Why?

## Use ListTools...

> ListTools:-Rotate([a,b,c,d],1);
[b, c, d, a]

> ListTools:-Rotate([a,b,c,d],2);
[c, d, a, b]

> ListTools:-Rotate([a,b,c,d],-1);
[d, a, b, c]

## odeplot...

with(plots):

odeplot(dsn, [t,u(t)], 0..tmax);

See ?odeplot for more examples.

 First 42 43 44 Page 44 of 44
﻿