sunflower

30 Reputation

3 Badges

6 years, 246 days

MaplePrimes Activity


These are questions asked by sunflower

Hello everyone!

i want to make a triangle which height's is a. Sorry, my English is not very good!

And I writed it by C language, but It is not right in maple. and I don't know. Can you help me? thank you very much! triangle.mw

Hello everyone!

This is a procedure which I have writern. I know I write false, X=x because in maple, x is a table.although I did write x::Vector. Can you help me? Sorry, my English is not very good! :( 

JACOBI.mw

hello all!

Pascal := proc (n::posint)

local x, y, i;

 for i from 0 to n do print(coeffs(expand((x+y)^i)))

end do end proc;
Pascal(4);

   

1
1, 1
1, 2, 1
1, 3, 3, 1
1, 4, 6, 4, 1

 How to create 

         

1
1  1
1  2  1
1  3  3  1
1  4  6  4  1

 

hello everybody!

I want to create a random symmetric matrix which have det=2. I just made it like this, no better than those ones. Thanks!

Doixung := proc (n)

local A, i, j; A := Matrix(n);

n := LinearAlgebra[Dimension](A);

for i to n do A[i, i] := RandomTools[Generate](integer(range = 1 .. 20))

   end do;

for i to n do

     for j to n do

           while j < i do A[i, j] := RandomTools[Generate](integer(range = 1 .. 20)) end do;

           while i < j do A[i, j] := A[j, i] end do

     end do

end do;

print(A) end proc

Hello everbody.

Newton:=proc(p[0],TOL,N)  

 local i,p,f;   i:=1;

 while i<= N do      

     p:=p[0]-(f(p[0]))/(diff(f(p[0]),x));    

     if abs(p-p[0])<TOL then             return p;     else i:=i+1;            p[0]:=p; end if;  

end do;

printf("The method failed after N iterations,N=%d",N);  end proc:

1 2 3 4 Page 1 of 4