J4James

355 Reputation

12 Badges

12 years, 110 days

MaplePrimes Activity


These are replies submitted by J4James

The idea is to plot the expression in F3 vs x=0..1.

For y we can use output = array([seq(0.1e-1*i, i = -110 .. 110)]).

But I can not make it happen.

Thanks

@Markiyan Hirnyk Thanks for your helpful explanation.

But I have another problem related to PDE.

I used ((`@`(D, D))[1](f))(N,t)=0 for one of the bc but

I got an error.

pde.mw

 

I adopted the approach suggested in an earlier post (http://www.mapleprimes.com

/questions/137320-Plotting-A-System-Of-Ode) for the known results,

but some part of curve is missing.

The output I got is

and the known results are

I increased the Digit, numpoints and also went for high grid size but no luck.

I thought maybe some one  would like to have a look and will help me out.

Thanks

paraplot.mw

@Christopher2222 As you suggested, I have increased the grid size and it gives me a

more clear result. There is a problem of memory allocation, whenever I go beyond 

[500,500]. But this time the results are very good.

contourplot(p(x)(y),x=-4.0..4,y=-1.5..1.5,grid=[400,400],

contours=25,color=black,labels=["x","y"]);

I choose to export the fig from maple as .eps, which gives a better visual output.

Thanks

@Christopher2222 As you suggested, I have increased the grid size and it gives me a

more clear result. There is a problem of memory allocation, whenever I go beyond 

[500,500]. But this time the results are very good.

contourplot(p(x)(y),x=-4.0..4,y=-1.5..1.5,grid=[400,400],

contours=25,color=black,labels=["x","y"]);

I choose to export the fig from maple as .eps, which gives a better visual output.

Thanks

First of all, I would like to thank both of you (@Markiyan Hirnyk and @Preben Alsholm) . 

The reason is that I use another software for just plotting purpose,

which gives me a very nice visual results.

The problem is that  the output produced by maple is not that good

(maybe bcoz of my lack of understanding).

Forexample

contourplot(p(x)(y),x=-4.0..4,y=-1.5..1.5,grid=[100,100]);

 

 

Here you can see, the output is not that clear. And I do not know how to choose 

a more visible color and also how to change the labels and to make it more bright.

 P.S. As you mentined about the  "connecting lines", bcoz of that I can not use the

data more freely (restricted to point style). 

 

 

First of all, I would like to thank both of you (@Markiyan Hirnyk and @Preben Alsholm) . 

The reason is that I use another software for just plotting purpose,

which gives me a very nice visual results.

The problem is that  the output produced by maple is not that good

(maybe bcoz of my lack of understanding).

Forexample

contourplot(p(x)(y),x=-4.0..4,y=-1.5..1.5,grid=[100,100]);

 

 

Here you can see, the output is not that clear. And I do not know how to choose 

a more visible color and also how to change the labels and to make it more bright.

 P.S. As you mentined about the  "connecting lines", bcoz of that I can not use the

data more freely (restricted to point style). 

 

 

I made a mistake and have to be consistent.

Thanks

I made a mistake and have to be consistent.

Thanks

@Markiyan Hirnyk, I executed it many times successfully.

Do not know why you are facing this problem?

@Markiyan Hirnyk, I executed it many times successfully.

Do not know why you are facing this problem?

@Markiyan Hirnyk 

I am using Maple 16 and its working.

``

restart:with(plots):with(plottools):with(stats):

unprotect(D):

a[1]:=0:a[2]:=0.2:a[3]:=-0.15:a[4]:=0.85:

b[1]:=0:b[2]:=-0.26:b[3]:=0.28:b[4]:=0.04:

c[1]:=0:c[2]:=0.23:c[3]:=0.26:c[4]:=-0.04:

d[1]:=0.16:d[2]:=0.22:d[3]:=0.24:d[4]:=0.85:

e[1]:=0:e[2]:=0:e[3]:=0:e[4]:=0:

f[1]:=0:f[2]:=0.2:f[3]:=0.2:f[4]:=0.2:

p[1]:=0.01:p[2]:=0.08:p[3]:=0.15:

N:=10000:x[0]:=0:y[0]:=0:

randomize():

for n from 0 to N do
r[n]:=rand()/(10)^(12);#random number between 0 and 1
if r[n]<p[1] then i:=1 elif r[n]<p[2]
then i:=2 elif r[n]<p[3] then i:=3 else i:=4 fi;
x[n+1]:=a[i]*x[n]+b[i]*y[n]+e[i];
y[n+1]:=c[i]*x[n]+d[i]*y[n]+f[i];
pt[n+1]:=[x[n+1],y[n+1]];
end do:

p:=pointplot([seq(pt[n],n=1..N)],style=point,symbol=
point,labels=['x','y'],tickmarks=[3,3],scaling=constrained,
axes=boxed,view=[-0.75..0.75,0..1.5],color=green);