Maple 18 Questions and Posts

These are Posts and Questions associated with the product, Maple 18

Hi,

Is there any difference between

Matrix(4,5,(K,C)->K+C);

and

Array(1..4,1..5,(K,C)->K+C);

 

Say if I have a very 'complicated' procedure myfunc(K,C) that takes two options, but it runs all dependently.

Matrix(4,5,(K,C)->myfunc(K,C));

and

Array(1..4,1..5,(K,C)->myfunc(K,C));

Which one is more efficient? The final ouput of each run from myfunc is just a integer value.

 

The reason I am asking it that i think both runs on a 'single' thread (core) as CPU usage is always very low, around 15-20%.

If I look at the task manager, some cores (threads) arent doing anything.

Is there anyway to speed things up?

 

Thanks,

Hello everybody,

While doing a document about quantum mechanics, I stumble on this strange behaviour.

>with(ScientificConstants);
>GetConstant(a[0]);
>GetValue(a[0])

Error message:

Error, (in ScientificConstants:-GetValue) `a[0]` is not a scientific constant object

But in the Assistant Scientific Constant, the value is there: 5.291772e-11m

Why is it not directly available like I did the first time?

Thank you in advance for your help.

 

--------------------------------------
Mario Lemelin
Maple 18 Ubuntu 13.10 - 64 bits
Maple 18 Win 7 - 64 bits messagerie : mario.lemelin@cgocable.ca téléphone :  (819) 376-0987

Hello,

I would like to ask if one can divide the maple worksheet (mw) to multiple files like series of command. It could be simillar to include in C++. I have found only save and read command but they can be use only for variables or they can be use in other way ? 

Thank you for any possible solution,

vidocq

f:=C->sum(x[cat(new,c)],c=1..C);

f(4) # does not give me what i want , which is

x[cat(new,1)]+x[cat(new,2)]+x[cat(new,3)]+x[cat(new,4)];

 

seq(x[cat(new,c)],c=1..4);
convert([%],`+`);

This works. But it's just a simple example to illustrate my problem.

 

Is there a way to fix this 'cat' problem in the procedure 'f'?

 

Thanks,

 

casper

v1:=[seq(tau[lambda,i]^2,i=1..5)];

latex(v1);

 

gives:

[{\tau_{{\lambda,1}}}^{2},{\tau_{{\lambda,2}}}^{2},{\tau_{{\lambda,3}}
}^{2},{\tau_{{\lambda,4}}}^{2},{\tau_{{\lambda,5}}}^{2}]

which produces a non natural output in latex, see below.

I wonder it could be improved in the future release?

'latex' command is really useful when i have large algebric output. But having to change this tiny thing at many places is just very time consuming. I'd really appreciate if this can be fixed in updates or future versions of Maple.

 

Casper

 

Hi all,

I will use the following dummy example.

with function,f

f:=(xid,yid)->sum(x[i],i=1..xid)*sum(y[i],i=1..yid);

 

and a complicated term, myterm


myterm:=(f(3,4)+f(2,2))*f(1,1):
myterm:=expand(myterm);

 

'if' i have some previous knowledge, or know a bit of the term, i can find the structure by doing this


repar:=[f(1,1),f(2,2),f(3,4)];  # Or with more f(xid,yid) terms

tmp:=seq(repar[i]=ff[i],i=1..3);
simplify(myterm,{tmp});          # This is fine, gives me what i want

 

But, can we go further, and more 'obvious'

 

Given the fucntion f, same as before, and the same 'myterm'

can I have this
restart:
iwant:=(f(3,4)+f(2,2))*f(1,1);  # as a result, straightforward

so I dont have to go back to 'repar' and find that the terms exactly are.

 

Thanks,

 

Hi, with a list

l:=[1,1,1,2,3,3,4];

What's the best way to get the index(s) for the values equal to '1'?

Say for x=1, we want

[1,2,3]

for x=2, we want

[4]

ect.

 

Hi say I have the vector V1.

V1:=Vector([a,b,c,d,e,f,g]):

and function myfun.

 

how do i use it as the input to the function my fun, by taking away each element in turn?
myfun(V1[2..]);              # 1st element removed
myfun(V1[[1,3..]]);         # 2nd element removed
myfun(V1[[1,2,4..]]);      # 3rd element removed

and so go

is there a more efficient way?

 

Many thanks,

Addition, subtraction, scalar product, vector, projections and graphs with physics packages and plots. With this you can begin to start the physics course for engineering.

Operaciones_con_Vect.mw   (in spanish)

 

Lenin Araujo Castillo

Physics Pure

Computer Science

Hello everybody,

Since I am geting older, I need to fix the font size form 12 to 14.  I have been tryong to find where to do that permanent change.  But without success.  Could someone help to to resolve this problem.  Thank you in advance for your help.

 

--------------------------------------
Mario Lemelin
Maple 18 Ubuntu 13.10 - 64 bits
Maple 18 Win 7 - 64 bits messagerie : mario.lemelin@cgocable.ca téléphone :  (819) 376-0987

Say I have this list,

tmp:=[[0, 1, 2], [1, 0, 2], [1, 1, 2], [1, 2, 0]];

and the sums of each element (list),

map(x->convert(x,`+`),tmp);

 

How do I quickly pickup the elements, where they sum to 3? Like this:

wanttohave:=[[0, 1, 2], [1, 0, 2],  [1, 2, 0]];

Thanks,

When I try "touch and drag" in Maple documents, the documentation for example, I end up selecting text instead of scrolling. Unfortunately the alternatives for scrolling are a) the scrollbar, b) page-up/down or c) moving the cursor. Each of those alternatives is about 2.5311 orders of magnitude more inconvenient than touch&drag.

Does anybody know if its possible to get Maple (18) to scroll instead of select text when I touch the screen?

 


m 18 cubacuhre integration fail, intergrand unknown

restartprintlevel = 3binomial(7, 2); with(StringTools); FormatTime(%c)with(LinearAlgebra); with(IntegrationTools)with(numapprox); with(OrthogonalSeries); LinearAlgebra:-HermitianTranspose(3-I*7)infolevel[`evalf/int`] := 4; pie = evalf(Pi)n = 1l = 0m = 0n1 = 1l1 = 0m1 = 0alpha = 5.8alpha1 = 4.2R = .5Theta = (1/6)*PiPhi = 3*Pi*(1/4)region := [r = 0 .. infinity, theta = 0 .. Pi, phi = 0 .. 2*Pi]r1 := proc (r, theta, phi, R, Theta, Phi) options operator, arrow; (r^2+R^2-2*r*R*(sin(theta)*sin(Theta)*cos(phi-Phi)+cos(theta)*cos(Theta)))^(1/2) end proc"coef:=(l1,l2,m1,m2)->(-1)^(l1-l2) (((4 *pie *(2 l1+1)!)/((2 l1-2 l2+1)!*(2 l2+1)!))*("
"(binomial(l1+m1,l2+m2)*binomial(l1-m1,l2m2))/(binomial(2* l1,2* l2)))())^(1/(2));NN:=(n,alpha)->((2 alpha)^(n+(1)/(2)))/(((2 n)!)^((1)/(2)));  "

integrand := sum(sum(R^(l1-l2)*SphericalY(l1-l2, m1-m2, Theta, Phi)*coef(l1, l2, m1, m2)*r^(2+l+l2)*SphericalY(l2, m2, theta, phi)*LinearAlgebra:-HermitianTranspose(SphericalY(l, m, theta, phi))*NN(n, alpha)*r^(n-l-1)*exp(-alpha.r)*NN(n1, alpha1)*r1(r, theta, phi, R, Theta, Phi)^(n1-l1-1)*exp(-alpha1*r1(r, theta, phi, R, Theta, Phi))*sin(theta), m2 = -l2 .. l2), l2 = 0 .. l1)

evalf(Int(integrand, region, 'epsilon' = 0.1e-3, 'method = _CubaCuhre'));
``NULL

binomial(7, 3)region4 := [x = 0 .. 10*Pi, y = 0 .. 10*Pi]

integrand4 := (cos(x)+(1/3)*sin(y))^6*(sin(y)-(1/3)*cos(x))^2

evalf(Int(integrand4, region4, 'epsilon' = 0.1e-3, 'method = _CubaCuhre'))

NULL

NULL

 

Download stovrlp2.mw

m 18 cubacuhre integration fail, intergrand unknown

 

 

Hi,

 

I am completely new to Maple (and this kind of software in general).

I am just on my first steps of learning...but I quickly noticed, that if I write Pi and hit enter, I do not get

the well-known greek Pi-symbol. I get an ordinary "p" as the result.

I checked the greek-palette...nearly all items in this palette are ordinary letters.

Does anyone have an idea whats wrong?

BTW: I don`t know if it could have to do with that, but I use a german windows 7 installation.

 

Thank you,

regards,

Kai

First 59 60 61 62 Page 61 of 62