emendes

395 Reputation

6 Badges

7 years, 101 days

MaplePrimes Activity


These are questions asked by emendes

Hello

I have a series of plots saved in fig0 (fig0:=rtable(1..number_of_figures);).  I had them plotted using plot:-display(fig0) but I could not figure out how to remove the frame box that separates each figure nor how to control the space between them when using size.

 

An exaggerated example follows

Many thanks

Ed

 

 

Hello

After getting help from users on this list, I wrote an example on how to iterate a discrete map using a given initial condition as follows:

restart:with(ListTools):
NestList := proc (f, x, n::nonnegint, nprec::posint := 10) local R, k; R := rtable(0 .. n, [x]); Digits := nprec; for k to n do R[k] := expand(f(R[k-1])) end do; [seq(R)] end proc:
logistic := proc (x) options operator, arrow; 4*x*(1-x) end proc:
fp := [solve((logistic@@5)(x) = x, x)]:
cfp := allvalues(fp[5]);
nstep:=12:
p := nstep+50; 
aaa := Flatten(map(`~`[Re], evalf(NestList(logistic, evalf(cfp), p)))); 
dat := [seq([i-nstep-1, aaa[i]], i = 1 .. p)]; 
plot(dat, style = pointline, symbol = solidcircle, symbolsize = 4, thickness = 0, view = [default, 0 .. 1]);

The result should be a period 5 and some chaotic data due to machine precision. However the trajectory ejected to infinity. I have tried with a different initial condition, say 0.1, and it worked just fine. Even if the precision is increased, the trajectory (orbit) will eventually eject to infinity.  I couldn't spot what is wrong.

I am running Maple 2017 on linux and on a mac. 

Many thanks

Ed

 

Hello

I am definitely missing something on how Maple deals with functions and outputs.  I need to define a new function using an output of a previous calculation but I didn't figure out how to do it. 

 

aux := rsolve({y(0) = y0, y(n) = 4*y(n-1)*(1-y(n-1))}, y(n));
solucao := (n,y0)-> aux;
solucao(3,1/2);

Neither n nor y0 are replaced for the given values.  What am I missing?

 

Many thanks

 

Ed

 

Hello

I am revising the unstable period orbits of the Logistic map, y[n]=4*y[n-1]*(1-y[n]), in Maple.  Although I have implemented the equation and use a loop for the iterations, I wonder whether there is a faster and concise way to code the equation in Maple. 

Here it is what I did:

y[0] := (-sqrt(5)+5)*(1/8);

for n to 10 do y[n] := 4*y[n-1]*(1-y[n-1]) end do;
soly := [seq(simplify(expand(y[n]), radical), n = 0 .. 10)];
dat := [seq([n, Re(evalf(soly[n]))], n = 1 .. 10)]; plot(dat, labels = ["k", "x(k)"], style = pointline,title="Period 2");

Since only few iterations are needed, the solution is symbolic (and then convert to float).  

Many thanks.

Ed

 

 

Hello

I wonder how I could use Maple commands to do the following:

An irrational number, ir, (a huge symbolic expression as a result of iterating a discrete map) is converted to single precision (Real16) and then to hexadecimal as a string. Example: using matlab it will be something like single(ir)=0.25(float representation) =3e800000 (hexadecimal representation).

I am not sure if single precision is available in Maple 2017 but I guess Real32, Real64 and Real128 are.

Once the hexadecimal representation is acquired I need to convert it back to Real16, Real 32 and etc.

Your help is much appreciated.

Many thanks

Ed

First 8 9 10 11 12 13 Page 10 of 13