Maple Questions and Posts

These are Posts and Questions associated with the product, Maple

Hi all.

Assume that we have:

where

and assume we  want to construct a special Vector as

and from the above vector construct following matrix

how can we do it?

Best wishes

Mahmood   Dadkhah

Ph.D Candidate

Applied Mathematics Department

RandomCompositions:= module()
local
Compositions, Rand,
ModuleApply:= proc(n::posint, k::posint)
local C;
Compositions:= [seq(C-~1, C= combinat:-composition(n+k, k))];
Rand:= rand(1..nops(Compositions));
()-> Compositions[Rand()]
end proc
;
end module:
R:= RandomCompositions(8,6):
n:= 3:
S:= 'R()' $ n;
map(lhs=rhs/n, Statistics:-Tally(op~([S])));

[0 = 7/3, 1 = 5/3, 2 = 4/3, 5 = 1/3, 6 = 1/3]

plot([S],x=0..8,style=point);

I have  plot problem .

I want to plot the statistics result,but it runs error.

 

 

Hi All,

I'm a new Maple user and I just have a question about evaluating a formula.

Say that you have a formula y=45*r*t

and you know what "r" is, lets say r=5

What do I do if I want to evaluate this formula for the values t=2 all they way up to t=150.

Is there a simple command that lets me do this?

 

Yours

John.

 



I am generating polynomials and I want to iterate each term in the polynomial and do something accordingly. I collect the first term. I wish to extract the tuples of 1,1,1 and 2,1,1 out and do some calculations.... Do you know how I could achieve that? Thank you:)

 

expr1 := mu*(h[1, 1, 1]+h[1, 1, 2]+h[1, 1, 3]+h[1, 1, 4])+J1*(h[1, 1, 1]*h[2, 1, 1]+h[1, 1, 2]*h[2, 1, 2]+h[1, 1, 3]*h[2, 1, 3]+h[1, 1, 4]*h[2, 1, 4])+2*J2*(h[1, 1, 1]*h[1, 1, 3]+h[1, 1, 2]*h[1, 1, 4]+h[1, 1, 3]*h[2, 1, 1]+h[1, 1, 4]*h[2, 1, 4]);
mu (h[1, 1, 1] + h[1, 1, 2] + h[1, 1, 3] + h[1, 1, 4]) + J1 (h[1,

1, 1] h[2, 1, 1] + h[1, 1, 2] h[2, 1, 2]

+ h[1, 1, 3] h[2, 1, 3] + h[1, 1, 4] h[2, 1, 4]) + 2 J2 (h[1,

1, 1] h[1, 1, 3] + h[1, 1, 2] h[1, 1, 4]

+ h[1, 1, 3] h[2, 1, 1] + h[1, 1, 4] h[2, 1, 4])
expand(expr1);
J1 h[1, 1, 1] h[2, 1, 1] + J1 h[1, 1, 2] h[2, 1, 2]

+ J1 h[1, 1, 3] h[2, 1, 3] + J1 h[1, 1, 4] h[2, 1, 4]

+ 2 J2 h[1, 1, 1] h[1, 1, 3] + 2 J2 h[1, 1, 2] h[1, 1, 4]

+ 2 J2 h[1, 1, 3] h[2, 1, 1] + 2 J2 h[1, 1, 4] h[2, 1, 4]

+ mu h[1, 1, 1] + mu h[1, 1, 2] + mu h[1, 1, 3]

+ mu h[1, 1, 4]

I'm taking my first steps with maple and pdsolve, trying to run the example in the maplesoft support page:

http://www.maplesoft.com/support/help/Maple/view.aspx?path=examples/pdsolve_boundaryconditions

which reads

>
> restart; with(PDEtools);
> U := diff_table(u(x, t));
>

and I get a solution that is different from the web page, and when i run

Im using maple 13. Any tips about what's wrong?

 

regards

Test_modify.mwGood Morning Everybody,

Can anybody demonstrate how I can convert the output from the procedure into an N X N Matrix depending on the nops from the attached file. Thanks everybody.

 

Regards,

 

Moses

 

with(LinearAlgebra):
a:=Vector([1,2]);
b:=Matrix([[1,2],[1,2]]);

Say if I need a^T * b * a, I will do this:

VectorMatrixMultiply(Transpose(a), b);
VectorMatrixMultiply(%, a);

But this seems too long for such a simple matrix (and vector) computation. I am sure there must be an short way.

What if I need more computation, like

 

a^T * b * c*d*f*g* a, where c,d,f,g are other 2x2 matrices.
 If I were to use the above command, that'll take a long time to input.

Thanks,

f:=x+y+y;

diff(f,x);
diff(f,y);
diff(f,z);

What I hope to get is a vector with i-th entry being the dervative of f, differentiated w.r.s.t the i-th parameter, like this

Vector([1,1,1]);

 

Is there a more efficient (built-in) command to do this?

 

VectorCalculus[diff] does not do what I want.

 

Thanks,

 

casper

 

Hi

I am using the Map function from the Threads package on a quad core processor, it only seems to use one thread however. The Array I am processing holds over 2 million entries and takes over 10 hours to calculate (single threaded).

Is this behavoir normal? I already tried to define a tasksize but that didn't work.

Kind regards

Jasper

Hi there

I have have a 18*18 matrix which almost each of its element are in symbolic form. Now I need to have all of its eigenvectors. Unfortunately when I use the "Eigenvalues()" function in maple i got nothing. In fact I got the error which comes below.

Error, (in content/polynom) general case of floats not handled

I need to know if there's a solution to eliminate the error? If not, what can I do to determine the eigenvectors and eigenvalues in symbolic form?

I'll be appreciated your help

Hi Maple friends.

I have a plot. I click on the plot, and the blue border appears the around the plot. I press the delete key on my keyboard, and the plot is not deleted. Not deleted when I press the backspace key either. I can right-click on the plot and choose 'cut', but that just copies the plot to the clipboard.

So how can I delete a plot from the worksheet, without deleting anything else?

Thanks in advance.

Hi Maple friends.

I am trying to differentiate these:

1. csc(x)/x

2. 3*x^2*cot(x)

From doing it by hand, I am getting:

1. -cosec(x)*(xcot(x) + 1)

2. 6x*cot(x) - 3x^2*cosec^2(x)

But Maple is giving the answer:

1. diff(csc(x)/x, x);

-csc(x)*cot(x)/x-csc(x)/x^2

2. diff(3*x^2*cot(x), x);

6*x*cot(x)+3*x^2*(-1-cot(x)^2)

My answers don't look like Maple's answers. Are they actually the same?

Thanks in advance.

 

The problem is how to plot a linear transformation, for example,

(x,y)->(x-y/2,y)

As, I searched, I found out that the code "LinearTransformPlot" can do that but it defines to act for example on lines or a certain subspace. May I ask you to learn the solution. Should we have a subspace untill we can plot the transformation? Thanks

Hello people in mapleprimes,

 

I want to modify the next equation: 

(**)  a:=sigma*omega*alpha = mu(H, H)*s*omega*gamma1*L+mu(F, H)*s*L-mu(F, H)*s*L*gamma1;

to be

(***)    sigma*omega*alpha = mu(H, H)*s*omega*gamma1*L+(1-gamma1)*mu(F, H)*s*L;

 

For that, first I defined b as

b:=sum(op(k,rhs(a)),k=2..3)=collect(sum(op(k,rhs(a)),k=2..3),{s,L,mu(F,H)});

, and substituted this to a with

subs(b,a);

 

But, what I could obtain was only the orignal equation (**) not (***).

Please tell me how to use subs to this problem to obtain (***)。

Thanks in advance.

taro

P.S.

I know

(****)collect(lhs(a)=rhs(a),{s,L,mu(F,H)});

works well as for what I wrote (**) as above.

But, originally, it was a result from substituting various equations into an equation.

For it, (****) does not work well.  

 

 

First 1326 1327 1328 1329 1330 1331 1332 Last Page 1328 of 2229