## return a list of indices that match a condition...

a:=Vector([2,3,4,5]);

select[flatten](x->x>=3,a);

This returns a Vector that satisfies the above condition. What's the most efficient way to get the indices of those entries?

For example, a list l:=[2,3,4] that correspond to the a[l] entries that satisfies the above condition.

l:=[2,3,4];

a[l]; # gives the same answer

Thanks,

casper

## How to let maple add two arrays only with the coef...

Let x:=2*[x_1,x_2,...,x_n];   y:=3*[x_1,x_2,...,x_n]; If I input x+y, it will turn out  5*[2x_1,2x_2,...,2x_n]; But I want to get  5*[x_1,x_2,...,x_n]. What should I do? Thanks!!

## How to generate 3d objects with desired dimensions...

Good morning.

I request your kind suggestion to my query posted.

With thanks & Regards

M.Anand

Assistant Professor in Mathematics

SR International Institute of Technology,

## Batch process worksheets and save as PDF...

Hi,

I wonder if there is a way to achieve this, say I have 4 Maple worksheets,

sheet1.mw

sheet2.mw

sheet3.mw

sheet4.mw

all of them can run seperately. Each of them runs on lots of data, and takes a big chuck of time. I hope to run them one by one. After each file is completed, save (Export) as PDF file, and move on to the next one.

On my own PC, I use Maple X64 windows version. I have never used the command line, but I suppose that will be done in this version, instead of the GUI version?

On the school server, it's Maple X64 linux version. So it's also has the maple command line version as well as the xmaple version.

Thanks,

casper

## The differences between two sequences...

restart:
seq1:=seq(i,i=1..5);
seq2:=seq(i,i=2..6);
dseq:=seq2-seq1;
seq1:=seq(i,i=1..5);
seq2:=seq(i,i=1..5);
dseq:=seq2-seq1;
seq1:=[seq(i,i=1..5)];
seq2:=[seq(i,i=1..5)];
dseq:=seq2-seq1;

Is that possible to get the differences between two sequences directly? (instead of using a list)

I don't quit understand why the second method would collapse the 0s into just a single value. It's not a set.

Thanks,

casper

## Fast random generation...

It says at

http://www.maplesoft.com/products/maple/new_features/maple18/Language_Programming.aspx#random

"When generating matrices and vectors of floats and integers, these flavors are very fast. "

But when I compare the new

time[real](Generate(('Matrix')(float, 300, 300)))

and

time[real](RandomMatrix(300, 300))

I find RandomMatrix over 300 times faster. Am I doing something wrong, or is RandomMatrix still the fastest way to generate random numbers?

## How do I get rid of editing lines in excess?...

Everytime I re-run a workfile, I get several extra editing lines inbetween my own command lines. Have I missed something in my settings?

Best regards
Emilijan Vuletici

## Prevent Maple from converting [[cm^3]] to [[m^3]]?...

Now that I got my units converted I have a new problem:

I have g/mol and g/cm^3, and the result is supposed to be per cm^3 too. So I would like to keep my grams as well as my  cm^3. However, Maple converts it all to kg and m^3!

That means I have to divide the final result by 10e6. No big deal, only that it looks strange on my worksheet (when I divide the units stay the same, so if I show that to someone they'll be amazed at the gigantic m^3 result number I got instead of just a few cm^3).

By the way, turing off the automatic unit cancellation (see link, my question a few days ago) does not change anything, the g->kg and cm^3->m^3 conversion take place as soon as I enter the values:

results in

and

gives

## Why does allvalues not eliminate all RootOf's ?...

Hi guys,

im trying to solve the linear equation system:

Then, assigning the solutions:

Then, eliminating the RootOf's for variable a:

Unfortunately, a_explicit still contains RootOf's. How can I avoid this?

Thanks,

Martin

## How to display very long expressions without "+[.....

Hi guys,

I'm trying to find the solutions to a nonlinear equation system:

mysol := solve({J*a = m*g*l*st-m*l*(c*cp*st+d*sp*st), cx*ux = cMx*xd+(Mx+m)*c+m*l*(-cp*pd^2*st-cp*st*td^2-2*ct*pd*sp*td+a*cp*ct-b*sp*st), cy*uy = cMy*yd+(My+m)*d+m*l*(2*cp*ct*pd*td-pd^2*sp*st-sp*st*td^2+a*ct*sp+b*cp*st), (-M*l^2*st^2+J)*b = m*l*sqrt(d^2-2*d*ct+ct^2+c^2*ct^2+(c^2*sp^2-2*c*cp*d*sp+cp^2*d^2)*st^2)}, {a, b, c, d})

The solution contains various implicit solutions with RootOf's. When trying to evaluate them by typing

allvalues(mysol);,

the returned set of solutions is about 800.000 characters long, but unfortunately contains various "+ [...15295 terms...] +" elements, and thus not displaying the full solution. The limits on the precision tab in the maple options are all disabled.
Does anybody know how to display the full expression, although it gets very long?

Martin

## Blurred GUI with macbook pro retina display...

Hi everyone,

I'm running Maple 18 and MapleSim 6.4 on my macbook pro 13 " with retina display and the GUI is blurred like there is no smoothing or the antialiasing is not working properly. I tried to find something helpfull in the setting but with no luck.

Is there something I can do to fix this?

Thanks

Carlo

## Introduction to electric current

Maple 18

Here in this work and used as the main topic a short description of electrostatics and electrodynamics using the Explore to model the fundamental laws command.

Corriente_Eléctrica.mw   (in spanish)

Atte.

L. Araujo C.

## Substitution Tensor command has problem with numbe...

I am having trouble with the SubstitutionTensor command.  It kicks out an error message for operand with different free indices, but the operands seems to be fine.  I checked all of the terms and they all seem fine. Thank you for your help.

 (1)

 (2)

 (3)

 (4)

 (5)

 (6)

 (7)

 (8)

 (9)

 (10)

 (11)

 (12)

 (13)

 (14)

 (15)

 (16)

 (17)

 (18)