## chrtzstn

Dr. Claudio Hartzstein

## 55 Reputation

13 years, 329 days
Israel Aerospace Industries
Senior Scientist
Raanana, Israel

## Seq slower than seq???...

Maple

I run two small computations to test the improvement that should occur when using several cores (8 cores in my computer):

`N:=100000.:`

`st:=time():`

`w:=seq(sqrt(i),i=1. ..N):`

`time()-st;`

and:

st:=time():

w:=Seq(sqrt(i),i=1. .. N):

time()-st;

And the results are: 23.6 sec with seq, and 118.4 sec with Seq!

Seriously?

How can these results be explained?

` `

## Matlab's parfor in Maple 2017...

Maple

I do long "for loops" which perform the same procedure with different inputs and collect the outputs in a vector. In Matlab I use the command "parfor" to accelerate the calculations.

What is the equivalent of "parfor" in Maple?

An example would be useful.

Thank You

## Recursive definition of a function using...

I have a nice family of functions of the form:

W:=(p,n,mu,w)->sum(w[k] * (n-k)* mu(n-k),k=1..n)

which can be evaluated for different p's using the operator mu*diff(...,mu)

The recursion begins with p=0 and proceeds using mu*diff(W(p,n,mu,w),mu) = W(p+1,n,mu,w).

Can anybody implement this procedure in Maple

Thank you

## distributive properties of sums....

How can I make transformations like:

sum(a*u[k]+b*v[k],k=1..n) into a*sum(u[k],k=1..n)+b*sum(v[k],k=1..n)

and in the opposite direction?

## convert the multiplication of two sums i...

Maple

I wish to convert:

Sum(x[k],k=1..n)*Sum(y[k],k=1..m) -> Sum(Sum(x[j]*y[k],j=1..n),k=1..m)

Can anybody show me an elegant way to do it?

Gracias

 1 2 Page 1 of 2
﻿