Matlab's parfor in Maple 2017...

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

how to create some sort of numbering for table ind...

hi every one,i want to create some kind of numbering for index, how can i generate them using "seq" command or "for loop" ?

 > restart; with(LinearAlgebra):
 >
 > for i to 3 do for j to 3 do N[i||j];print(%);od:od:
 (1)
 > # i want to create the below numbers, how can i do this using for loop or seq command ?
 > N[11]
 (2)
 > N[12]
 (3)
 > N[13]
 (4)
 > N[21]
 (5)
 >

invalid if statement termination...

Hi,

While running a maple code, I am getting a "invalid if statement termination" error. Most of time when I use nested for loop and if statement inside the loop, I am getting this error. Another error I get frequently is "Error, unterminate loop". I am using "shift+Enter" instead of Enter to avoid blanks but still such error appears. Can any one provide some rules which I should keep in mind to avoid these errors. My maple worksheet is enclosed-

invalid-if-stat-term-error.mw

Thanks and Regards,

Nilesh

Trajectory algorithm only working for first step?...

I'm trying to calculate the trajectory of a 3-particle system. I defined my parameters. Wrote a do loop. Got the number of iterations I expected. But when I look at the tables of position for each particle after I run the loop, the trajectory only changes for the first iteration, then it stays the same. In other words, it shows that the particle moved slightly after the first increment of time, but thereafter it doesn't move.

 (5)

filling matrices or arrays using a function....

Ok, I'm  a confident Matlab user, but for some reason Maple befuddles me.

Let's say I have two functions, x=f(t) and y=g(t) and I want to fill both two vectors with values, with t=-n:n.  How do I construct a loop to do that?

How we can write 'If and else loop' in Maple 18?...

I need help regarding this figure. i want to write both equations in maple 18. Second equation is related to first equation.So, please help me to write this code. I will be grateful.

save a sequence of variables...

I've been using maple every few years since 1986, but am a bit rusty again.  I want to save a sequence of variables created in a do loop. I'm sure this is an old easy question, but can't find the answer searching.  For example

for i from 1 to 10 do
a:=i:
save a, `i.m`:
od:
quit

Keeps overwriting the file i.m, but I want files 1.m, 2.m, 3.m, etc.  Don't see how to do this, but should be easy.

How do I solve the problem that attached? ...

How do I solve the problem that attached? Please give me the correction. thank you

Problem to create a loop...

Hello!

Hope everyone good. I am facing problem to define a loop. Actually I want to solve the attached file for different values of H like H=[100,125,140,160] for this I don't know how to tackle it. My program do working on single value of H. Please solve my problem as soon as possible. I am waiting your positive response.

Help.mw

With my best regards and sincerely.

School of Mathematical Sciences
Peking University, Beijing, China

How to run an input file .mpl...

Dear all,

I am trying to run a maple worksheet as an input file, in another maple worksheet. Therefore, I have exported my input worksheet to an inputfile (.mpl).

In the input file I have a variable H, which I vary in the second worksheet.

restart;
with(ExcelTools);
with(ListTools);
B := Import("C:\\Users\\s110950\\Dropbox\\Afstuderen\\New formula\\Importdata\\161005 - Staalprofielen.xlsx", "Blad1", "A7:AA344");

V := ["IPE 330", "IPE 360"];
currentdir("C:\\Users\\s110950\\Dropbox\\Afstuderen\\New formula\\Afrondingstraal")

for i  from 1 to 2 do
H := V[i];
cmaple.exe<"C:\\Users\\s110950\\Dropbox\\Afstuderen\\New formula\\Afrondingstraal\\Model38loop.mpl">;
end do;

However, it does not run the file. Does anyone know how to make it run?

Kind regards,
Bastiaan Overdorp

How to achieve its numerical solution？...

I  encountered a non-integrable integral in the process of solving the following process, . How to achieve its numerical solution? Such as in a looping   code：

#######
pa[i] := pa[i-1]-(Int(subs(t = tau, Lpa[i-1]+Na1[i-1]-Na2[i-1]), tau = 0 .. t));

pw[i] := pw[i-1]-(Int(subs(t = tau, Lpw[i-1]+Nw1[i-1]-Nw2[i-1]), tau = 0 .. t)); u[i] := u[i-1]-(Int(subs(t = tau, Lu[i-1]+Nu1[i-1]+Nu2[i-1]), tau = 0 .. t))；

######
Detailed code see annexBC2.mw

If condition with loop...

When I write an conditional command I come back and press enter again and again but I need only last one for example

>f:=x->x^2+x+1

>g:=y->y^2+2*y+6

>x:=0;y:=0

>if f(x) <g(x) then;

>x:=x+1 elif f(x) >g(x) then;

>y:=y+1 elif f(x)=g(x) then;

>x;

>y;

>f(x) end if;

I push enter and it write x:=1 then I click if command and push enter again and it writes x:=2 and continues like y:=1, x:=3, y:=2, x:=4,  y:=3 and lastly

4

3

21

But I only need last one. Can I do this only push enter once. Of course my problem is more complicated than this f(x) , g(x) . Thanks

iterative method for nonlinear equation...

hy

i have to develop a code i which i have system of nonlinear equation

i have to generate the matrix of that nonlinear equation then i want to do or apply any method say newton method and make a loop which help us to find a solution using some tolerance

at the end i get a result in form of a table which give nth matrix then value of function matrix at nth value then error i-e xn-x(n-1)

How can I write a procedure to add all multiples o...

I need to write a procedure that adds all multiples of 5 and 7 less than an arbitrary number. I was thinking something maybe with mod? I am very new to Maple.

On in this same assignment, we are also supposed to generate a sequence using the Fibonacci equation but from an arbitrary pair of initial conditions. So if there are some parallels between these two problems, I would love to learn from that angle.

We recently in class learned about do loops, so if there is a way to attack these problems with do loops, I would like to hear!

Suggestions on how to check the progress of a proc...

Hello

I wonder if there is a way to see the progress of a specific procedure.  I have checked the forum for some answers and found that some of them propose a progress bar. However the progress bar doesn't seem to fit within a procedure.

I don't need anything fancy but I need to see the progress of the loop inside of the procedure (over 3,000,000 times).

Any suggestions?

Many thanks

PS. I am running Maple 2016 too but I would rather see a solution that works on Maple 14 too, if possible.

 1 2 3 4 5 6 7 Last Page 1 of 12
﻿