PDA

View Full Version : Maple Help

Andrew D
2011-Feb-15, 10:30 PM
Is anyone here familiar with maple?

If so, I'm trying to create a procedure to create a 1x1 grid for a three dimensional plot of any size, such that i can put in (for example) "proc(9);" and return all points from (0,0,0) to (9,9,9).

update: I can use with(combinat) permute(n,3) to get the majority of the coordinates, but since its mean to run permutations, it ignores duplicates, so now I'm just missing all the points where x=y, x=z, or y=z.

Hornblower
2011-Feb-15, 10:49 PM
Is anyone here familiar with maple?

If so, I'm trying to create a procedure to create a 1x1 grid for a three dimensional plot of any size, such that i can put in (for example) "proc(9);" and return all points from (0,0,0) to (9,9,9).

I don't have the foggiest idea what you are talking about. To me, maple is a tree that generates a lot of pollen that makes me sneeze in April, and then has gorgeous autumn leaves in October. Please don't just assume that old fuddyduddies like myself know all of the latest jargon.

Andrew D
2011-Feb-15, 11:37 PM
haha, I'll try to be more specific, as I'm sure most her are indeed familiar with maple (tree). Maple is a computer algebra system similar to matlab. If you know matlab, a working matlab procedure would be very close to what I need, its mostly just minimum syntax differences between the two.

Andrew D
2011-Feb-16, 02:32 AM
Nevermind, i figured it out.

If anyone is interested:

grid := proc(x,y,z,g)
> description `creates points of a reference grid for a g cubic 3d plot`;
> print ([x,y,z]);
> if z < g then procname(x,y,z+1,g);
> elif z=g and y<g then procname(x,y+1,0,g);
> elif y=g and x<g then procname(x+1,0,0,g);
> end if:
> end proc:

then run grid(0,0,0,g) where g is the length of one of the cube sides.