## Check Matrix argument when entering a procedure...

Hello,

To check my arguments in a procedure I need something like

myproc := proc(M :: Matrix(square, rational)

, N :: Matrix(shape=triangular[lower, unit], datatype = rational
, O :: Matrix(shape = square, dimension = 5

)

end proc;

How does that work in Maple? What is the correct Syntax? I tried many different things that doesn't fit.

## Using if/else statements to fill an empty matrix?...

I am trying to use a do loop with if/else statements to create a 5x5 unit matrix. I made an empty array. Converted it to a matrix. Then made a do loop where I was trying to get the matrix elements where i=j to be 1 and all else to be 0. It didn't spit out a matrix.

Any advice? I assume I must have missed a small detail in syntax.

 (1)

 (2)

By the way, I am open to completely different methods, also! I was just trying to use loops to do it rather than inbuilt commands.

## How to find a linear parameter within a matrix by ...

Pay attention to the Next Question

## Nested loops and matrix...

I have to find which column of a matrix contains repeated elements, i have done it in this but i'm afraid that the nested loops don't run correctly:

```for j by 1 to 10 do
for i by 1 to 30 do
h:=Dati[i,j];
for x by 1 to 30 do

if Dati[x,j] = h then
if x <> i then
return j;
end if;
end if;
end do;
end do;
end do;```

## Error in matrix multiplication...

Hi everybody

In the attached file, when I run the code an error appears while calculating "omegaL1" parameter. The dimensions of the matrices are correct but the source of error is unknown to me. Can anyone help me?

## subs based on a variable...

I'm trying to use subs to substitute an unknown variable with a number in a Matrix

My Matrix is called values and I have the following

change := f2:

subs(change = 5, values):

This does nothing but when I have the following, it works as expected (All f2 in the Matrix values are replaced with 5)

subs(f2,values):

I'm wondering if its trying to find and replace 'change'. If this is the case how can I get it to use whats assigned to the variable. (I've tried eval(change) but that doesn't work either)

Many thanks

## does anybody know how to copy a rtable structure i...

does anybody know how to copy a rtable structure in a worksheet and paste it on the other worksheet?

I copy it by right click and paste on the other one but no data transfered.

## How can i plot 3 column Matrix data in 2D plot ?...

Good day, I need to 2D plot from points which I get by solving numerically 17-degree equations. Firstly I take an only first solution of the equation as below, and I have a Matrix with 3 column which represents X, Y, and VALUE respectively. On the left side should be the first column ( X ), and right axis Y (2. column). As seen from Matrix X and Y getting the value between 0 and 10. Is there any option that I can plot my data in 2D?  Thanks in advance.

points := seq(seq(seq(Fun[n, i, j], n = 0 .. step), i = 0 .. step), j = 1);
Mat := Matrix((step+1)^2, 3, [points]);
.                             X                  Y                 VALUE

with(plots);
pointplot3d(Mat, style = point, color = black);

## How to normalize rows of a matrix?...

Since GramSchmidt does not take Matrix as an input (I wish it did), I would like to know how to normalize a matrix rows. For example if input matrix is:

M = [  1    2]
[  3    4]

How do I convert it into

Mn = [ 1/sqrt(5)    2/sqrt(5) ]
[ 3/5            4/5          ]

Each row of matrix Mn has length of 1.

Thank you.

## How do I make a 3D animation of a matrix plot?...

I am using matrices to input data in order to plot it on a surface plot. Is it then possible to export an animation of this graph rotating around an axis?

My matrix is 40 x 3 Matrix

Thanks :)

## Why I receive Error, (in Matrix) unable to store '...

For the below code why I got error???

 >

 >
 >
 >
 >
 >

## Putting entries of a matrix into a new matrix but ...

Assume you have a matrix A and somewhere you want to make a copy of it like B and working with them independently. Let's say you have a loop and after doing a proc on B again you have to make it equal to A. So changes on B shouldn't effect on A. What is the common way of taking such copies of A in Maple?

The following methods don't work.

```A:=Matrix(3);
B:=A;
B(1,1):=1;
A;```
```A:=Matrix(3);
B:=subs(B=A,B);
B(1,1):=1;
A;```

What I came up with is the following but it will look weird if one really needs to write something meaningless like *2/2.

```A:=Matrix(3);
B := (1/2)*subs(B = 2*A, B);
B(1,1):=1;
A;```

## How do you recommend to calculate the square root ...

How do you recommend to calculate the square root of big Matrices (e.g, 300*300) with Maple??

My machine couldnt calculate the square root of Matrices (9*9) as you see below:

 >
 >
 >
 >
 (1)
 >
 >
 >
 >
 >
 >

## Use the command 'matrix' to define a matrix, and h...

Use the command 'matrix' to define a matrix, and how to call the first row elements of the matrix?

This method

a:=matrix([[1,2,3],[4,5,6],[7,8,9]]);

a[1..2,-2..-1], does not work? Why？

## How ask Maple to arrange linear equations in Matri...

I have many linear equations as below(f,g,h,...,p, are linear of S,T,..,W):

y1=f(S[i,j],T[i,j],U[i,j],V[i,j],W[i,j]);

y2=g(S[i,j],T[i,j],U[i,j],V[i,j],W[i,j]);

y3=h(S[i,j],T[i,j],U[i,j],V[i,j],W[i,j]);

.

.

.

yn=p(S[i,j],T[i,j],U[i,j],V[i,j],W[i,j]);

Where (i,j)=(0,0),...,(I,J)

How ask Maple to write them in Matrix form as below:

AX=0

Where X is: X=Transpose{S[0,0],S[0,1],S[0,J],...,S[1,0],S[1,1],...,S[1,J],...,S[I,0],S[I,1],...,S[I,J],

T[0,0],T[0,1],T[0,J],...,T[1,0],T[1,1],...,T[1,J],...,T[I,0],T[I,1],...,T[I,J],...,W[I,J]}

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