MaplePrimes Questions

From this program

S1:=unapply(u*FresnelS(u)+((1/Pi)*cos((1/2)*Pi*u^2))-(1/Pi),u);

C1:=unapply(u*FresnelC(u)-((1/Pi)*sin((1/2)*Pi*u^2)),u);

R1:=1;

u1:=evalf(sqrt(0.4));

E1:=evalf(Pi*R1*S1(u1)+R1);

D1:=evalf(Pi*R1*C1(u1)+1);

a:=evalf(Pi*R1*(u1));

with(plottools);

with(plots);

c1 := circle([D1,0], R1);

display(c1);

plot([a*FresnelC(u),a*FresnelS(u),u=0..u1]);

p1:=plots[display](plot([1+a*FresnelC(u),a*FresnelS(u)-E1,u=0..u1]),c1,scaling=constrained);

h := Array(1..2^16,datatype=float[8], storage=rectangular, order = C_order) # of hfarray
x:= Read(clarinet): # of Array
ArrayTools[Copy](x,h):

First, I have the following object:

H := Array(1..2^16,datatype=float[8], storage=rectangular, Order = C_order).

Now, I try to find out which type it has:

whattype(H),

and it only tells me 'Array', but it's fare more than that: datatype=float[8], storage=rectangular etc. etc.

If I'd change a setting in this array and try to store it into the original, Maple would give me a type clash error.

But how to find out these types?

Hi,

I would like to know how to pass my list of initial conditions "a" in to my solutions via some form of index to generate plots for each of my initial conditions. I have indexed in the code but need some form of related calling procedure.

 

Thanks in advance.

 

>restart;

> eq:=diff(y(x),x,x)+y(x)^2*x^2=x^2;


> a:=[-0.6,-0.4,2.4,3.4];


> ics[1]:=y(0)=0,D(y)(0)=a[1];


> sol[1]:=dsolve({eq,ics[1]},numeric);

in a loop, how can i instruct maple to skip the loop if a condition is met?

example

for m from 1 to 10 do

for n from 2 to 11 do

if m=n, skip

else carry on with code

end do

end do

so that if m=n=4, maple will skip it to do m=4, n=5

 

thanks

lovinash

Hi, all, Is there a way to extract all the variables in a list of polynomials? For example: L:=[2*a*b,x^2+y,d*y^2]; I want to get [a,b,x,y,d]. The order of variables does not matter. Thanks Gepo
Hi, all, I have known how to compute Groebner basis over galois field. For example, the following example is to compute Groebner basis over GF(2^3): alias(alpha=RootOf(Z^3+Z+1)); F := {alpha*x*y+alpha^2+1, alpha^2*x^2-1}; G := Groebner[Basis](F, plex(x,y), characteristic=2); But now I have a doubt. If I give one more "alias", is the Groebner basis still computed over GF(2^3)? For example: alias(alpha=RootOf(Z^3+Z+1)); alias(beta=RootOf(u^2+u+1)); F := {alpha*x*y+alpha^2+1, alpha^2*x^2-1,alpha^2*beta+x*y}; G := Groebner[Basis](F, plex(x,y), characteristic=2);

Hi all,

I am pretty new to maple so forgive me if i am asking a basic question.

I have created a simple loop to evaluate the sum of  1/(k^2)+3, for k from 1 to n, where in this case n = N*20. here is my code and it works ok (for N=1), i have checked with the built in add/evalf functions.

sm := 0: N := 1:  n := N*20

for k from 1 to n do

sm := sm+(1/(k^2)+3):

end do:

evalf(sm);

Given a set of data points, say X={...} and Y={...}, how do I use the Least Squares operation (or another operation if necessary) to fit the curve y=a*x^b to the data points and find the constants a and b. Any help is appreciated. Here is what I have tried:

with(CurveFitting):

LeastSquares([X,Y],v,curve=a*x^b);

And I get an error that the curve is not linear. Help please.

Hi everybody,

I just started using maple for my research few days ago and I would need some help. With "for" loop, I created many matrices and now I would like to create a plot using the first element (A[1,1]) of every matrix. I tried the conventional plot command but without success. It only plot the first and the last value. 

here is an example.

If the first element of the mattrixces is the following C[i][1,1] where i=1..10

I tried to use the following command:

plot(C[x][1,1],x=1..10, style=point)

Hi, I'm working on the Smoluchowski equation (essentially the diffusion eqn with an extra derivative) diff(u(x,t),t)=k*diff(u(x,t),x)+D*diff(u(x,t),x,x) k is piecewise so the function has to be solved numerically, the boundary values are specified u(0,t)=u(1,t)=0 but i need the derivative at the boundaries D[1](0,t) and D[1](1,t). It seems to be simple to evaluate a numeric derivative of an ODE but I can't see how to do it for a PDE. Any help welcome, even some sort of brute force method if necessary. Thanks, Ryan

I understand how to use an IF statement, but what does ' if ' mean??

I have solved a partial differential equation numerically using PDSolve and now I would like to visualise what is happening in my system. I have tried to watch some tutorials on how to do so, but these only explain how to do it when you have a function, rather than a set of numerical results. Also, the animate function of pdsolve only gives me a 2-D plot, however, I would like a 3-D animation. Could anyone give me any tips on how to do so

 

Thanks in advance.

Can anyone please write a procedure to multiply 2 matrices in maple ??
(  it has to be a written procedure so without using maple built in multiplication matrices function )
thankssss

Hi, all, Is there a way to compare two lists containing polynomials to check whether they are equal? Thanks Gepo
First 2031 2032 2033 2034 2035 2036 2037 Last Page 2033 of 2431