Items tagged with matrix matrix Tagged Items Feed

Is there a maple function that'll allow me to generate the matrix M(5 by 5) below given that matrix A and B are 3 by 3 M:=LinearAlgebra:-ZeroMatrix(5) A:=Matrix([[a11,a12,a13],[a21,a22,a33],[a31,a32,a33]]) B:=Matrix([[b11,b12,b13],[b21,b22,b33],[b31,b32,b33]]) Matrix(5, 5, {(1, 1) = a[11], (1, 2) = a[12], (1, 3) = a[13], (1, 4) = 0, (1, 5) = 0, (2, 1) = a[12], (2, 2) = a[22], (2, 3) = a[23], (2, 4) = 0, (2, 5) = 0, (3, 1) = a[13], (3, 2) = a[23], (3, 3) = a[33]+b[11], (3, 4) = b[12], (3, 5) = b[13], (4, 1) = 0, (4, 2) = 0, (4, 3) = b[12], (4, 4) = b[22], (4, 5) = b[23], (5, 1) = 0, (5, 2) = 0, (5, 3) = b[13], (5, 4) = b[23], (5, 5) = b[33]});

Hi fellow Maple users,

I'm trying to solve an eigenvalue problem of Ax=wx, where A is a 6 by 6 Hermitian matrix with two parameters x and y. I want to solve it for w and then plot3d it with x and y as unknowns. The way I have been doing is first find the characteristic equation Determinant(A-wI)=0 and then solve it for w, and then plot3d the solutions within a range for x and y. My problem is sometimes solve(Determinant(A-wI)=0,w) would give me the 6 solutions expressed in x and y, but sometimes when the numbers in A are changed it will only give me a Rootof solution with which I cannot plot. I'm wondering if there is a better way to do this. I'm actually not very interested in the symbolic solution of w expressed in x and y, just the plot, so if there is a numerical alternative it's good too.

Thank you in advance!

hello every one

i need to solve this equation

> A1 := Matrix([[a11, a12, a13], [a12, a22, a23], [a13, a23, a33]]);
> A2 := Matrix([[A], [B], [C]]);
> A3 := Matrix([[15], [0], [0]]);
> eq := multiply(A1, A2)=A3;

> solve(eq, {A, B, C});

thank you :)

Hi all,

I have this matrix for example:

A := <<1,2>|<3,4>>;

How to determine: 2^A

Thank you

Hello,

I would like to assume a matrix to have only real components.

I have seen that the function assume has some features to assume properties for matrix. But, I didn't find the one that I want : "assume a matrix to have only real components".

This assumation should allow me to suppress this kind of choice in my code :

if A::{complexcons, undefined} then
evalf(1/A);
elif A::rtable and ArrayTools:-NumElems(A) = 1 then
Vector([evalf(1/A(1))]);
else
evalf(LinearAlgebra:-MatrixInverse(A));
end if;

Do you have some ideas ?

P.S: The matrix should be also a square matrix. So, the first code line will probably be : assume(a, 'SquareMatrix')

Thanks a lot for your help.

for example

There is a Matrix A:=Matrix([[1,2,3],[4,5,6]]), which function can help me find if 4 is an entry of  this Matrix?

Above is the outcome I am getting at the current time... and I used map(expand,...) to do the expansion then simplifing it goes back to the origional. 

Below is the outcome I would like to achieve...you can see that this is a different method. The problem I have is this is the right click method of expansion and I am tring to build a program that solves matrix ODE's by just inputing the initial matrix and it doing everything so i can check my answers step by step. 

So my question is, is there another method of command input to get the bottom line in the below picture?

 

 

convert(Matrix(2, 2, {(1, 1) = (s-2)/(s^2-s-12), (1, 2) = -5/(s^2-s-12), (2, 1) = -2/(s^2-s-12), (2, 2) = (s+1)/(s^2-s-12)}), parfrac);
%;
Error, (in convert/parfrac) input must be a rational polynomial in s

gives me that error and i assume I can not use this command for matrix opperations if that is true is there a way to do it such as issolateing each element and doing each individually and putting it back into a matrix is that posible if so can someone show me the code for that?

 

I have the following transition rate matrix. Upto m the matrix follows a patern and after that the patern changes but repetative structure is there upto n. In this problem m=4, n=9. How to write these entries using for loop in maple?

Matrix.pdf

i just need 1 at a11 position of a square matrix. do not need zeros like in complete pivoting. plz help

Hi EveryOne!

Let matrix M over GF(2n)/f(x). How to compute:

1. Rank of M.

2. Sum of the elements and Square of this Sum in any row of M (i.e: Sum=mi0 + mi1 + ... + min, and Sum2 ).

3. New matrix M, where in row i  mi0 = mi0/Sum2, mi1 = mi1/Sum2, ..., min = min/Sum2.

Please help me. Thank you very much.

hi I am tying to create a matrix: 

 

for i from 1 to 5 do

for j from 1 to 5 do

 A[i][j]:=i+j;

od

od;

 

But it doesn't create a matrix. As when I tried inverse operation it doesn't work. How can I create a matrix? Also can the index start from 0??

thanks

Let M be the matrix [[]] means that a matrix without any array. If we call RowDimension(M) then it output is 1 and we know that it is zero. What I have to do? It is hilarious that the RowDimension([[1]])=RowDimension([[]])!!!

I know that the "Rank(M)" command of Maple computes the rank of matrix M and I know that the "RowDimension(M)" gives the number of rows of M. Is there any command to gives the number of nonzero rows or columns of M?

For example, Let M be the following matrix. I want [2,3] as the output  where the first component ( second component. resp) is the number of nonzero rows (nonzero columns. resp) of M.

                              [1  5  6]

                       M=   [0  0  0]

                              [2  3  5]

i need to find how many rows and how many columns has a matrix that i just imported so i don't have to use readstat so it will be more automatic.

m1 := ImportMatrix("Matrix1.txt");
F := readstat("rows of the matrix");
C := readstat("columns of the matrix)")

LAG := C-1;
LAGG := F-1

for a to LAG do
for v to F do
for i to C-a do
h := m1(v, i);
r := m1(v, i+a);
..
..
.
.
in mathlab we use 

a=load('BROOKER.dat'); 

[m,n]=size(a);

but in maple? please help

1 2 3 4 5 6 7 Last Page 1 of 36