MaplePrimes Questions

Search Questions:

Latest Questions Latest Questions Feed

Help with...

January 11 2010 Jimmy19001 128

I have tried to programme a bubble sort procedure below and i'm a bit stuck and not sure where i've gone wrong. Many thanks.

 bubblesort:=proc(C)
local n,o,r,k,i:
n:=rtable_dims(C):
o:=rhs(n):
r:=lhs(n):
for i from r to o - 1 do
if C[i] > C[i+1] then
(C[i], C[i+1] ) := (C[i+1], C[i]);
else
(C[i], C[i+1] ) := (C[i], C[i+1] );
fi:
od:
return(C);
end proc:

 C:=rtable(1..6,random(1..50));
bubblesort(C);

C:=[44 5 38 37 3 15]
[5 38 37 3 15 44]

Hola,
How to ensure that the coefficients are displayed in a more understandable?

Hi,

Below, you will see a serie that I would like to obtain in Maple.  Any way I trie I am stick with Pi.  Any ideas?

Thanks in advance.

 

--------------------------------------
Mario Lemelin
messagerie : mario.lemelin@cgocable.ca
téléphone :  (819) 376-0987

I am trying to plot a two variable expression in single 2D plot but have been unsuccessful.

I already have an equation in two variables that is obtained through a lengthy process of calculations:

DEQ = A*D + B*Ne, where A and B are constants, and D and Ne are variables.

I can easily plot a 3D graph of this, but I'd also like to plot what are essentially slices of the 3D graph onto a 2D graph. Actually to plot several slices on a single 2D graph.

I have tried to do the following but have been unsuccessful:

Below is my attempt at a cocktail sort, there are two lines of code missing as i am unsure as what to put there. I think the rest is correct.

Please check and see if you can spot what i need to include.

Hi Maple users,

I have a license for the Global Optimization Toolbox (GOT) 12 (i.e. for Maple 12). However, it seems it cannot be installed under Maple 13. As the GOT is essentially a frontend for an external library, I find this restriction a bit artificial and annoying. I don't see a reason why I should buy a new license for something that is practically the same that I already bought...!? Do I overlook something? Is there a simple way of installing the GOT 12 under Maple 13? Thanks for any hint!

quantum

Is anyone aware of Maple code intended to do some of the floating-point stress tests like are done in Kahan's paranoia code? (See here.)

I realize that modern Maple claims to comply with IEEE 854, 754, etc. But I like to check some things for myself. Call me paranoid. ;)

acer

How do I get a,b,c,d to the function a*b^x*c^y*d^z-x-2*y-3*z  get the minimum with {0<x<1,-1<y<1,-1<z<0}?
Thanks in advance !

Hi

I read a lot of guides, forums and etc, i've been trying to add/remove shiftenters and i've got always the same error. Every parenthesis is checked. Please tell me, where is the mistake?


 

Hello,

I have problem with Inverse Fourier Transformation. I have an expression S, Maple can't calculate its Inverse Fourier Transform:
 

restart;with(inttrans);

S:=Heaviside(-w)*exp(-(9/640000000*I)*w)/w^2;
invfourier(S,w,t);

 

I have Maple 13.
Thanks for help in advance.

I have programmed a bisection procedure below, and i was just wondering how i would change this into a recursive version of the method. I don't really understand what is ment by recursive?

bisection:=proc(f,X,Y,Z)
local a,b,c,d;
a:=X:
b:=Y:
d:=Z:
while(abs(b-a)>d) do
c:=(a+b)/2:
if sign(f(c))=sign(f(a)) then a:=c else b:=c
fi:
od:
print(evalf((a+b)/2)):
end proc:

Many thanks!!!

convert Arg[I*Sinh[1 + I]]to Pi - ArcTan[Cot[Abs[Tanh[1 - I]]]]

arg(I*sinh(1+I))

arctan(cot(abs(tanh(1-I))))

Hi All,

I am combining two problems I have with fsolve. 

1)  When fsolve finds a solution, it does not distribute the result globally.  So I have to cut 'n paste each result on another line.  Big PIA.  Is there a way to globalize the results?

If i have two lists L:=({1,2,5},{3,4,6},{1,2,3}) and G:=({2,1,3},{3,5,1},{1,5,2})

How would i write a procedure to put these two lists into one as {1,1,1,1,1,2,2,2,2,3,3,3,4,5,5,5,6} i now there is a method in maple help but it doesnt meet what i need.

Any help would be appreciated.

First 766 767 768 769 770 771 772 Last Page 768 of 1146