## How do I select rows of an array?...

Hi,

I am just starting with Maple after using Mathcad for nearly 30 years. I want to recreate something I have used a lot in Mathcad: select certain rows in array based on a specified criterion. For example, I want to save just the rows that have a certain value in a certain column and save the new array for use later. I am slowly learning how to do it Maple--for instance, I learned that I need to change the variable printlevel if I want to get the output from nested loops.

I currently have the following code:

k := 1;

rows := RowDimension(M);

for i to rows do

if M[i, 3] = "A" then

row(out, k) := row(M, i);

k := k + 1;

end if;

end do;
out;

This doesn't seem to work, though. When I try to display out, I just get the name out instead a matrix of values.

I would appreciate it if someone could give me some idea of what I am doing wrong (with Maple, that is).

Thanks,

John

## How can I write a sum over even numbers, of a term...

Hello

I have the following summation to do,

d(l,m')=\sum_{N=-l'}^{l'}d(l',N,m')=d^{l'}_{00}(\dfrac{\pi}{2})d^{l'}_{0m'}(\dfrac{\pi}{2})f_{m'0}+\sum_{N=1}^{l'}((-1)^{l'}+1)d^{l'}_{0N}(\dfrac{\pi}{2})d^{l'}_{Nm'}(\dfrac{\pi}{2})f_{m'N}

where  d^{l'}_{0N} are the rotation matrix functions and  f_{m'N} is a piecewise function which takes a certain value at N=0, another value for N even and it takes 0 as a value for N odd.

The prblem is that I don't know how to write a summation for N even only so that in that case i can replace f_{m'N} by its expression for N even. The other way is to write f_{m'N} as a piecewise function but in that case, i don't know how to do it (I tried to use assuming N even ..) but got wrong answer.

Thank you for helping me solving my proble.

Best regards.

## How to enter the fluid convective term using the P...

Dear all,

I'm trying to enter an equation (Navier-Stokes) in Maple using the Physics[Vectors] package. I am having trouble with the term

$(u\cdot \nabla) u$

but Maple returns an error when entering the commands :

( u_(t,x,y,z) . %Nabla) u_(t,x,y,z)

I tried other combinations of this without success, like :

( u_(t,x,y,z) . %Nabla)(u_(t,x,y,z))

( u_(t,x,y,z) %. %Nabla) u_(t,x,y,z)

( u_(t,x,y,z) %. %Nabla) (u_(t,x,y,z))

Could you please give me some help with this?

## Fraction of formula too long with typesetting leve...

Hello,
I have a small problem with the display of fraction and x_dot at the same time.

This the exemple :

with(Typesetting);
compactdisplay = flase;
Settings(typesetprime = false);
Settings(typesetdot = true);

diff(1/2*LongExpression*x(t), t);

The Results

when I choose the typesetting level : Extended. I got this result :

And when I choose the typesetting level : Maple Standrad. I got this result

What I  want to have is mix of both, it mean like this

## Pairing 2 lists into another list and use it for p...

Hi please, how can I pair two lists and form another list?

P := [.6286420119, -.6286420119, 0., 0., 0., 0., 0., 0., 0., 0., 0.]

Q = [2.106333379, 2.106333379, 4.654463885, 7.843624703, 10.99193295, 14.13546782, 17.27782732, 20.41978346, 23.56157073, 26.70327712, 29.84494078]

I want to pair them into something like this:

W := [ [.6286420119,2.106333379], [-.6286420119,  2.106333379] ... ]

Then use pointplot(W) and  display(seq(pointplot(W[j], j = 1 .. 20), insequence = true):

## Finite Difference Method for PDE's...

Hello Everyone.

Hope you are fine. I have two following queries

1. Are there any builtin commands in Maple, so that we can apply the finite difference method directly to the PDE's?

2. We all know about "BurdenFaires, and Burden's NUMERICAL ANALYSIS" book. The important Maple codes are discussed on this book. Is there any website where I can take these codes on Maple files?

I am waiting for kind response.

Thanks

## How to partially evaluate inert expression?...

I am trying to present a linear combination of vectors as such using mathML. In order to prevent automatic simplification I use InertForm package. The problem is, it also leaves me with unevaluated vector command, which is the only part of the expression I don't want to be inert.

Str :=  "1/3*Vector([3^(1/2), -3^(1/2), 3^(1/2), 0]) -1/3*Vector([3^(1/2), 3^(1/2), 3^(1/2), 0])+ Vector([2,1,1,0])":

Set := {op(InertForm:-Parse( Str ))};
Set := {-%*(%/(1, 3),

%Vector([%^(3, %/(1, 2)), %^(3, %/(1, 2)), %^(3, %/(1, 2)), 0])),

%*(%/(1, 3),

%Vector([%^(3, %/(1, 2)), -%^(3, %/(1, 2)), %^(3, %/(1, 2)), 0])

), %Vector([2, 1, 1, 0])}

printf(InertForm:-ToMathML(%+(eval(op(Set)))))


Hence my question: Is there a way to only evaluate the vector command, while keeping the rest of the expression inert?

## animate Fractals ...

Hi,

How to animate my fractals procedures ? I managed to put them in the procedure, to explore them with the Explore command, but I can’t animate them, ( i want to export them in GIF format.) Thank you for your help

Fractalsanimate.mw

 >
 >
 >
 >
 >
 >
 (1)
 >
 (2)
 >
 (3)
 >
 (4)
 >
 (5)
 >
 (6)
 >
 (7)
 >
 (8)
 >

## Skipping NULL values ...

Hello,

I am a first time user of Maple. I have an (m x n) array called 'arr' with missing values. For all non NULL values within the array I'd like to apply a function, called 'EigenvalueEquation'. My Ansatz is as follows:

map(EigenvalueEquation, arr)

It produces an error since one cannot execute a function with a NULL value as an input. How can I skip those entries within my array? I'd like to avoid looping over the entire array.

Any help is greatly appreciated.

Patrick

## How can these three Watt's curves be plotted in th...

Two of the three Watt's curves plotted in this worksheet display with gaps.

Why is this and how can these curves be displayed without gaps?

WattsCurve.mw

## operator changing only like only in function witho...

Function given like this

J:=0

F:=proc(operation)

J:=0;

for i to n do
for j from i + 1 to n do if A(i, j) = 1 then J := J + mod(X (operation) Y); end if; end do; end do;
end proc;

I have simply put the word operation their to explain

If call the fuction F by F("m")  m means multiple the I should get * operator should multiple and it should multiply

If I call function F by F("A") A means Addition then should get + operator should add and it should do +

If I call function F by F("S")  S means Subtraction then should get - operator should subtract and it should do -

mod means absolute value always

## error, null fix?...

Hi

Keep getting "Error, null" on every calculation i make. It indicates hidden spaces or something weird????.

Screenshot of it is included.

https://imgur.com/a/wSdUeqe

Would be great with a fix or some help because this is driving me mad....

## How do I keep the same digits in the multiplicatio...

I have  a:=1; b:= 2; c:=1; d:= 6; e:= 2;

P:= a*b*c*d*e;

How do I get  P:=1*2*1*6*2  result with the Maple command?

## error in finding the coefficient of a algebraic te...

Hello,

I have a term:

eq:=2*cosh(xi)^8*alpha*B[2]^2 + 4*A[2]*sinh(xi)^6*cosh(xi)^2 + 4*A[1]*sinh(xi)^5*cosh(xi)^3 + 4*sinh(xi)^4*cosh(xi)^4*A[0];

I want to extract the coefficient of for example "sinh(xi)^6*cosh(xi)^2" but the following codes failed:
coeff(eq,(sinh(xi)^6)*(cosh(xi)^2));

frontend(coeff,[eq,(sinh(xi)^6)*(cosh(xi)^2)]);