## 55 Reputation

9 years, 195 days

## Printing the axis values in a plot...

Maple 17

Hi there,

I would like to know whether there is some way to print non-integer axis numbers for a given plot.

Let's say I have an array for an independent variable such as [0.5 1 1.5 2]. I would like Maple to use these values in the corresponding axis instead of printing the array indices [1, 2, 3, 4].

I would like to know how this is done for a surface plot.

Attached is the worksheet where "b" is such a parameter/independent variable: MapleSimulation_test11.mw

Thank you,

jon

## Arguments in legend of pointplot...

Maple 17

Hi there,

is it possible to have the legend of a pointplot accepting arguments?

Say I have an array of 3 values (e.g. p:=[1.5,2,2.5]) representing a given parameter for a function. When representing this function by means of a plot, I would like the legend (legend="Parameter " + value in array; legend=["Parameter", "Parameter", "Parameter") to accept the contents of the array, without entering the values manually:

Parameter 1.5

Parameter 2

Parameter 2.5

How can this be achieved?

Thanks,

jon

## Multiple pointplots...

Maple

Hi there,

I am trying to display multiple pointplots in the same plot. I would like to either distinguish the plots by their color or by the symbol (square, traiangle, circle) at each data-point. May be both, although I ignore whether using symbols at data-points is possible in Maple.

The plot i would like to achieve is this:

Maple says that my points are not in the correct format: MapleSimulation_test6.mw

My data array N has two parameters, and the free variable. The two parameters are also varied over a certain range. For plotting purposes, I would like to have one of the variables fixed, select three parameters for the other variable, and plot all data-points for them.

The resulting data array N seems to be OK, but I am aware that my attempt for plotting multiple arrays may be wrong. May be pointplot is not even the best choice.

Any ideas?

Thank you,

jon

## Multi-dimensional matrices/arrays...

Maple 17

Hi there,

I was trying to simulate the behaviour of a one-variable, discrete-time function having three parameters.

M[n+1]=(b·theta^(m)·R[n])/(theta^(m)+R[n]^m)

defined for b, theta, m > 0

Say I want to simulate the function for the following values

b := [seq(1 .. 10, 1)];
theta := [seq(1 .. 5, 1)];
m := [seq(1 .. 2, 1)];

for n from 1 to 10.

I guess I need to build a 4-dimension array. But I was not able to find the right way to do this: should I use the Array strucutre? and if yes, how would I do it? As far as I've read, indexing would be an issue: should I create special indexing functions?

If I'm not wrong Maple matrices (Matrix) are just 2D.

Once the values of M computed, I would like to generate the corresponding plots, varying one parameter while the other two are fixed, and drawing the different M's in the same plot.

How can I achieve this?

Furthermore, if I would like to generate all possible combinations, I guess I would need to insert the solution given to the above question within a for loop. Will Maple display all plots or will it overlap/overwrite the preceding plot if used within a loop?

Thanks,

jon

## Understanding discrete function creation...

Maple 17

Hi there,

first post. I am a beginner both with Maple and this forum, so please forgive my mistakes. Just here to learn.

I could not successfully use the Maple editor here, so the code goes as plain text, although I also attach the code: MapleSimulation_test.mw.

I am trying to simulate the function below for certain values of the parameters, but when executing the loop, Maple prints just R. Can anyone tell me where my error is, please?

f := .25; g := 1; R[0] = 5; R[1] = 4.8; nDays := 30;

lambda1:=(1 - f + sqrt((1 - f) + 4*g*f)*1/2;

lambda2:=(1 - f - sqrt((1 - f) + 4*g*f)*1/2;

-lambda2*R[0] + R[1]
k1:=--------------------------;
lambda1 - lambda2

lambda2*R[0] - R[1]
k2:=-------------------------;
lambda1 - lambda2

R:=n-> k1*lambda1^n + k2*lambda2^n

for n from 2 to nDays
do R:=evalf(subs(n=%,R));
od;

 1 2 3 4 Page 4 of 4
﻿