Items tagged with matrix matrix Tagged Items Feed

Hi, I have 2 Questions about programming in maple. I will be thankful if you help me as soon as possible.

First; How can I display a n*n HilbertMatrix?

Second: I wanna make a 2*2 matrix which its transpose is egual to its inverse, How can I do that by helping reflectionmatrix?

(I'm an amateur programmer, I use maple 13 on my pc)

I faced a very large eigenproblem during my research. The square matrix under consideration is of size more than 2^30 times 2^30. I have tried to deal with this problem by the QR algorithm with double implicit shift (more precisely, the Francis double step QR algorithm). I'm a very beginner of programming, but I tried as follows:

--------------------------------------------------------------------------------------------------

A := Matrix([[7, 3, 4, -11, -9, -2], [-6, 4, -5, 7, 1, 12], [-1, -9, 2, 2, 9, 1], [-8, 0, -1, 5, 0, 8], [-4, 3, -5, 7, 2, 10], [6, 1, 4, -11, -7, -1]]):
H := HessenbergForm(A):
p:=6:  
for p while p>2 do: 
q:=p-1: 
s:=H(q,q)+H(p,p):  
t:=H(q,q)*H(p,p)-H(q,p)*H(p,q): 
x:=(H(1,1))^(2)+H(1,2)*H(2,1)-s*H(1,1)+t: 
y:=H(2,1)*(H(1,1)+H(2,2)-s): 
z:=H(2,1)*H(3,2): 
for k from 0 to p-3 do:  
V:=Vector([x,y,z]):   
P:=Transpose(HouseholderMatrix(1/(Norm(V+exp(argument(V(1))*I)*Norm(V,2)*Vector(3,shape=unit[1]),2))*(V+exp(argument(V(1))*I)*Norm(V,2)*Vector(3,shape=unit[1])))):   
r:=max(1,k):
H[k+1..k+3,r..6]:=MatrixMatrixMultiply(Transpose(P),SubMatrix(H,[k+1..k+3],[r..6])):  
r:=min(k+4,6):
H[1..r,k+1..k+3]:=MatrixMatrixMultiply(SubMatrix(H,[1..r],[k+1..k+3]),P):   
x:=H(k+2,k+1):
y:=H(k+3,k+1):   
if k<3 then z:=H(k+4,k+1):   
end if: 
od: 
P:=GivensRotationMatrix(Vector([x,y]),1,2): 
H[q..p,p-2..6]:=MatrixMatrixMultiply(Transpose(P),SubMatrix(H,[q..p],[p-2..6])): 
H[1..p,p-1,p]:=MatrixMatrixMultiply(SubMatrix(H,[1..p],[p-1,p]),P): 
if abs(H(p,q))<10^(-20)*(abs(H(q,q))+abs(H(p,p))) then    H(p,q):=0: p:=p-1:q=p-1:  
elif abs(H(p-1,q-1))<10^(-20)*(abs(H(q-1,q-1))+abs(H(q,q))) then    H(p-1,q-1):=0: p:=p-2:q:=p-1:  
end if:  od:
--------------------------------------------------------------------------------------------------

It seemed that replacing 0 in a Hessenberg matrix by a non-zero element is not allowed. How can I remedy this?

Plus, can anyone tell me the problem of the above thing(it's not really a programming...;( ), please?

I would also appreciate it if someone let me know a better idea for a huge eigenproblem.

Thanks in advance.

in LinearAlgebra Eigenvectors calculation.

Maple 2015 Error

 

 

So the above output startled me.  I have used the Maple Linear Algebra Eigenvalues, Eigenvectors commands many times with no problem.  Can any one explain to me what is going on.  The program correctly calculates the eigenvalues for the matrix which are all distinct for a real symmetric matrix, and thus should have three distinct non-zero eigenvectors, yet the eigenvectore command returns only zeros for the eigenvectors.  I calculated an eigenvector by hand corresponding to the eigenvalue of 1 and obtained (1, -sqrt(2)/sqrt(3), -1/sqrt(3).

 

So this is either a serious bug or I am going completely insane. 

Sorry for the uninformative title. I've never used Maple, but I'm willing to buy a student license and learn it. But before spending too much effort and money I need to know if it suits my needs.

Basically what I need to do is:

1) I have a positive definite symmetric matrix of size nxn, where n can range from 2 to inf. I don't know the elements, except the fact that the diagonal has ones everywhere. All I know is that the elements out of the diagonal are in the range [0,1)

2) I have to compute the lower triangular cholesky decomposition of this matrix, lets call it L.

3) I need to subtract from each element of L the mean of the elements in the respective column. Lets call this matrix L*

4) Then I need to evaluate another nxn matrix computed from the elements of L* following a simple pattern.

5) Finally I need to find the eigenvalues of this last matrix.

What I would ideally want is to get a symbolic representation of the n eigenvalues as symbolic functions of the (unknown) elements of the matrix at point 1.

I can drop the assumption of n being unknown, i.e. fix n=3 and get the 3 functions that, after replacing the right values, give me the eigenvalues, then fix n=4 and get 4 functions, etc.

Is this possible to do in maple?

Thank you

hi .how i can calculate eigenvector associated with the eigenvalue of the matrix.for example according attached file below

what are  eigenvector associated with the eigenvalue of matrix q which  determined as (2646.408147, 3142.030259, 6621.757707) respectively??

thanks...

eign.mw 

Hello all,

I am trying to create a matrix throgh a procedure but unfortunately I could not find how to define an empty matrix in Maple. This is how my procedure looks like,

Initial_Matrix := proc (BC::list, n, BP::list)
local M::Matrix, i;
M:=[][];
for i from 1 to numelems(BC) do
M:= <M,function_coeffs(BC[i], n, BP)>;
end do;

where the procedure function_coeffs returns a row vector. Logically, it should keep adding rows function_coeffs(BC[i], n, BP) to the emty matrix, but its not happening. Please help me out.

Thank you for your time.

Suppose we are given a matrix M[n*2n] of n linearly independent row vectors. Then I am trying to create a procedure to add n more linearly independent row vectors to this matix resulting in to a matrix M[2n*2n].

Consider this easy example, if the given matrix $M_{2*4}$ is

Matrix(2, 4, {(1, 1) = 4, (1, 2) = 1, (1, 3) = 0, (1, 4) = 0, (2, 1) = 0, (2, 2) = 0, (2, 3) = 4, (2, 4) = 1}) 
then we can add $[0,0,0,1]$ and $[0,0,1,0]$ to obtain the matrix $M_{4*4}$

Matrix(4, 4, {(1, 1) = 4, (1, 2) = 1, (1, 3) = 0, (1, 4) = 0, (2, 1) = 0, (2, 2) = 0, (2, 3) = 4, (2, 4) = 1, (3, 1) = 1, (3, 2) = 0, (3, 3) = 0, (3, 4) = 0, (4, 1) = 0, (4, 2) = 0, (4, 3) = 1, (4, 4) = 0})

 

Can I use rref form?Thank you for your help.

 

hi...amount of Determinant  is infinity?how i can remove this bad calculation ?

thanks...mode_shape2.mw

I want to have a matrix such that 

Hi all

I need to convert int matrix into matrix over finite field.

E.g: Convert inform integer number

      A := <140, 155, 162, 64;

               218, 12, 245, 50;

                36, 251, 34, 253;

                171, 251, 184, 37>;

 into B = <x^7+x^3+x^2,x^7+x^4+x^3+x+1,x^7+x^5+x, x^6;

             x^7+x^6+x^4+x^3+x, x^3+x^2, x^7+x^6+x^5+x^4+x^2+1, x^5+x^4+x;

            x^5+x^2, x^7+x^6+x^5+x^4+x^3+x+1, x^5+x, x^7+x^6+x^5+x^4+x^3+x^2+1;

            x^7+x^5+x^3+x+1, x^7+x^6+x^5+x^4+x^3+x+1, x^7+x^5+x^4+x^3, x^5+x^2+1>;

 

(Matrix B over finite field GF(2^8)/f(x) =x^8 + x^6 +x^5 +x^3 +1) 

Thanks alot.

 

a := Matrix(2, 2, {(1, 1) = 1, (1, 2) = 2, (2, 1) = 3, (2, 2) = 4})with(LinearAlgebra)

 

a.a^T = (Matrix(2, 2, {(1, 1) = 1, (1, 2) = 2, (2, 1) = 3, (2, 2) = 4})).(Matrix(2, 2, {(1, 1) = 1, (1, 2) = 2, (2, 1) = 3, (2, 2) = 4}))^TNULL

I am not getting the answer.

I want to get the answer for this product of matrix and its tranport.

I do not want to create transport matrix again for this calculation.

The transporse matrix b is

b := Matrix(2, 2, {(1, 1) = 1, (1, 2) = 3, (2, 1) = 2, (2, 2) = 4}) = Matrix([[1, 3], [2, 4]])

a.a^T is equal to a.b = Matrix([[5, 11], [11, 25]])NULL

For large matrices i cannot do this. Hence this request.Any one please send the code. Thanks.

 

Download transpose_doubt_1.mwtranspose_doubt_1.mw

Ramakrishnan V

rukmini_ramki@hotmail.com

Hello, I'm trying to enumerate matrices, each P [j] with j = 1,2,3 ... n-1. , and also can also the value of its elements with P [j] (r, k) for example.
n:=4;

for j from 1 to n-1 do 
P[j]:=Matrix(n); 
for l from 1 to n do
P[j](l,l):=1;  
end do; 
end do;
Error, invalid operator parameter name

Regards.

I have a matrix A and a matrix B defined as B:=A. When an entry of B is changed in my Maple code, the matrix A is also changed. 

restart:
A := Matrix([1, 1]):
B := A:
B[1, 1] := 2:
print(A):

The result is

[2,1] but as you see, I did not change the entries of A during the code.  

This never happen for numbers. 

Please help me.

confused in matrix substitution

http://tinypic.com/r/5a048l/9

If I have an N-dimensional vector V and a polytope defined as the set of solutions to the equation A*x = b, where A is a d X N matrix, and b is a d X 1 vector, how can I project V onto the surface defined as above?

Thanks!

Hello,

I have a matrix K.

K:=Matrix([<0, -1, 1, -1>,<-1, 0, -1, 1>,<-1, 1, 0,-1>,<1, -1, -1,0>]);

I would like to program this operation :

May you help me to code this operation?

Thanks a lot for your help

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