student_1

305 Reputation

6 Badges

8 years, 249 days

MaplePrimes Activity


These are questions asked by student_1

I want to write a code for 3D animation of solutions of PDEs.  Specially, I wonder 3D animation of wave equations etc.

Example: I can write a code for 2d animation but not write 3d animation.

a:=-2:
b:=2:
alpha:=0.1:
beta:=1:
pde:=diff(uu(x,t),t)=alpha*diff(uu(x,t),x,x)+beta*uu(x,t)*(1-uu(x,t));
IC:=uu(x,0)=(sech(10*x))^2;
BC:=uu(a,t)=0,uu(b,t)=0;  

s:=pdsolve(pde,{IC,BC},numeric ,timestep=1/100, spacestep=1/100);
s :- animate( uu(x,t) ,t=0..tbas, frames=40, labels=["x", "u(x,t)"], labelfont=[TIMES,ROMAN,14]); 
g3:=s :- plot3d(uu(x,t), x=-xbas..xbas,t=0..tbas, shading=zhue, axes=boxed, labels=["x","t","u(x,t)"], labelfont=[TIMES,ROMAN,16]);

 But how to write a code for 3d animation?

Thanks.

 

How to write a code to get following Matrix D?

MY TRY: (But it' s not completely what I seek)

restart:

k:=1:
M:=2:
N:=2^k*(M+1):

U:=Matrix(M+1,M+1):
for r from 2 to M+1 do
for s from 1 to r-1 do
if type(r+s,odd) then
U(r,s):=2^(k+1)*sqrt((2*r-1)*(2*s-1)):
 else 0 end if:
end do:
end do:

#Let's find Matrix D, In here it' s shown matrix DD 
DD:=Matrix(N,N,shape=diagonal,fill=U);

Dear there, 

Is there a possibility for tracking changes like Microsoft Office in the saved a Maple worksheet after some editings?


I think that we all encounter the same case. I mean we don't remember generally all changes after editing our codes. 

If there is no possibility for tracking changes,  what are your solutions or suggestions in order to prevent to forget? 

I want to find following NxN matrix P                                           (N=2^k.M where k and M are a positive integers)  

My Code Try: question.mw

restart:
with(LinearAlgebra):
interface(rtablesize=20):
k:=2:
M:=4:
N:=2^k*M: 
for i from 1 to M do
S:= (sqrt(2)/2^k)*Matrix(M,M, (i,j)-> `if`(`and`(i::odd,j=1) ,-1/(i*(i-2)),0)):   
end do:
C:= (1/2^k)*BandMatrix( [ [ seq(-1/(2*sqrt(2)*(i-1)*(i-3)), i=4..M)], [ 1, seq(0*i,i=1..M-1) ],[ seq(4/2*(i-3),i=2..M)]
                ]
              ); #I think the matrix C is not same in the question
     
Gen:=proc(K::posint,A,B)
  Matrix(scan=triangular[upper],[seq([A,seq(B,i=j..2^(K)-1)],j=1..2^(K))]);
end proc: 
P:=Gen(k,C,S);

question.mw

Hi,

I have a numeric method for solving differential equations. You can find the Maple code.

 numeric_method.mw

 Question: In the method, we have 10^(-6) decimal error. How to quickly find the which decimal error by Maple? What are your suggestions? 

3 4 5 6 7 8 9 Last Page 5 of 14