## 155 Reputation

12 years, 150 days

## Is there any simple way to parallelly so...

Maple

Hi,

I have a set of linear equations in terms of Ax+B=0, where A and B are matrices.

I used linsolve or LinearSolve to solve the equations.

Is there any simple way to run linsolve/LinearSolve parallelly? suppose I already have matrices A and B.

Thank you very much

## Write string to file...

Maple 18

Hi,

I would like to a string of characters to a file. For example,

***

str:="hello world";
WriteFile[APPEND]("D:\\output3.txt", str);

***

It doesn't work. I did not get output3.txt :(  How should I do, to write a string of characters, such as "hello world" to a file?

Thank you

## Clean memory/restart inside a loop...

Maple 18

Hi,

I have a loop code, such as

****

i_max:=10;

for i from 1 to i_max do
blah blah blah

end do;

****

I would like to clean memory, something like restart suppose to do, after each cycle. Restart could only work at top level. How should I do to clean memory after each cycle?

## Obtaining power of polynomial where the ...

However, still, I would like to have a simple, straightfoward solution. The situation is not about several term case, x^a*y^b + x^(a+2)*y^b, but for a single term. I have a term "3*x^k*y^(k+2) ", and how should I do to obtain the power of x, and the power of y? (k and k+2)

I tried the following input as somehow suggested in the link above

***********

term:=3*x^k*y^(k+2);

x_degree:=map(t -> `if`(match(t = a*x^b*y^c, x, 's1'), subs(s1,b), NULL), convert(term, list));
y_degree:=map(t -> `if`(match(t = a*x^b*y^c, y, 's1'), subs(s1,c), NULL), convert(term, list));
print(x_degree,y_degree);

*****

I got

***

k (k + 2)
3 x y
[0, k, 0]
[0, 0, k + 2]
[0, k, 0], [0, 0, k + 2]

****

I have no idea why k appear at second variable in [0,k,0] while k+2 appear at the third in [0,0,k+2]...

## Substitute variable...

Maple 18

Hi,

Excuse me, I have a following expression

x^2+x+2;

I want to replace all x as x+1

x:=x+1 does not work.

Is there any simple solution?

Thank you very much in advance

 4 5 6 7 8 9 10 Page 6 of 10
﻿