Items tagged with matrix matrix Tagged Items Feed

Hi,

 

I have a system of equations containing curls, divergence and gradients of variables. 

How can I extract the coefficients of the equations (i.e. coefficients of d/dt rho, d/dx p) and form a matrix?

thanks.   

test.mw

restart; with(LinearAlgebra)

``

dF := -.525*exp(-7*t)+2.625*exp(-3*t)+.8*exp(-4*t);

-.525*exp(-7*t)+2.625*exp(-3*t)+.8*exp(-4*t)

(1)

``

e3 := `<,>`(1, 1, 1); E := proc (m) options operator, arrow; IdentityMatrix(m) end proc; beta := `<|>`(.1, .6, .3); S := `<|>`(`<,>`(-3, 1, 1), `<,>`(1, -5, 2), `<,>`(0, 2, -4)); S0 := -S.e3

beta := Vector[row](3, {(1) = .1, (2) = .6, (3) = .3})

 

S := Matrix(3, 3, {(1, 1) = -3, (1, 2) = 1, (1, 3) = 0, (2, 1) = 1, (2, 2) = -5, (2, 3) = 2, (3, 1) = 1, (3, 2) = 2, (3, 3) = -4})

 

S0 := Vector(3, {(1) = 2, (2) = 2, (3) = 1})

(2)

Z := `<|>`(x, y, z)

Z := Vector[row](3, {(1) = x, (2) = y, (3) = z})

(3)

ME := MatrixExponential(S+Typesetting:-delayDotProduct(S0, Z), t);

`[Length of output exceeds limit of 1000000]`

(4)

MEint := map(int, ME.dF, t = 0 .. infinity)

Error, (in int) wrong number (or type) of arguments: wrong type of integrand passed to definite integration.

 

`&beta;plus&Assign;solve`(Z = beta.MEint, Z)

"(RTABLE(18446744074195006390,VECTOR([x, y, z]),Vector[row])=RTABLE(18446744074193876574,VECTOR([.1, .6, .3]),Vector[row]).MEint) betaplus:=solve (RTABLE(18446744074195006390,VECTOR([x, y, z]),Vector[row]))"

(5)

``

1step- I want to integrate the (ME*dF) from t=0 to ∞ .

2step- Evaluate Z=<x,y,z> by solving Z=β*MEint.

Download test.mw

Hello,

I would like to ask for help with factorization, collection or decomposition of matricies. If I have the symbolic product of matrices:

A := Matrix(2, 2, {(1, 1) = a[11], (1, 2) = a[12], (2, 1) = a[21], (2, 2) = a[22]})

B := Matrix(2, 2, {(1, 1) = b[11], (1, 2) = b[12], (2, 1) = b[21], (2, 2) = b[22]})

then C:= A*B :

Matrix(2, 2, {(1, 1) = a[11]*b[11]+a[12]*b[21], (1, 2) = a[11]*b[12]+a[12]*b[22], (2, 1) = a[21]*b[11]+a[22]*b[21], (2, 2) = a[21]*b[12]+a[22]*b[22]})

and my question follows:

Can I factor this result C and get the imput matrices A and B ? Is any function for this operation ? I would like to use it for matrices 3 time 3 not only for 2 times 2.

Thank you for your help,

vidocq

 

I have a nonlinear system with 4 equations and 4 unknowns. I am using fsolve. I know that there are multiple solutions for each variable but am only getting one. I need the others. what do I do??

This is my code:

R__1 := Matrix([[1, 0] , [0, 1] ]);

R__2 := Matrix([[1/2, sqrt(3)/2] , [-sqrt(3)/2, 1/2] ]);

R__3 := Matrix([[-1/2, sqrt(3)/2] , [-sqrt(3)/2, -1/2] ]);

R__4 := Matrix([[-1, 0] , [0, -1] ]);

R__5 := Matrix([[-1/2, -sqrt(3)/2] , [sqrt(3)/2, -1/2] ]);

 

d__1 := Vector( [ 0, 5.4] );

d__2 := Vector( [ 6.4, 4.539] );

d__3 := Vector( [ 11, 4.078] );

d__4 := Vector( [ 15.5, 2.079] );

d__5 := Vector( [ 19, 1.039] );

 

a := Vector( [ a__x, a__y] );

 

A__1:=R__1.a+d__1;

A__2:=R__2.a+d__2;

A__3:=R__3.a+d__3;

A__4:=R__4.a+d__4;

A__5:=R__5.a+d__5;

 

OO:=Vector([O__x,O__y]);

 

DA1:=A__2.A__2-A__1.A__1-2*(A__2-A__1).OO;

DA2:=A__3.A__3-A__1.A__1-2*(A__3-A__1).OO;

DA3:=A__4.A__4-A__1.A__1-2*(A__4-A__1).OO;

DA4:=A__5.A__5-A__1.A__1-2*(A__5-A__1).OO;

 

fsolve({DA1,DA2,DA3,DA4},{a__x,a__y,O__x,O__y});

Thanks for any tips you may be able to offer

 

AoA. How are you hope you will be fine. Sir the following matrix have been given

A := Matrix(2, 2, {(1, 1) = 1, (1, 2) = 2, (2, 1) = -1, (2, 2) = 2});

B := Matrix(2, 2, {(1, 1) = 1, (1, 2) = 0, (2, 1) = -2, (2, 2) = 3});

C := Matrix(2, 2, {(1, 1) = 0, (1, 2) = 0, (2, 1) = 0, (2, 2) = 0});

I want to write M by M matrix using the above matrices like this

P:=[[[A,B,B,...,B],[C,A,B,...,B],[C,C,A,...,B],[.,.,.,...,B],[C,C,C,...,A]]]

PhD (Scholar)
Department of Mathematics

I want to get the result of multi-matrix multiply like followed below,

but error "final value in for loop must be numeric or character"

(*n is arbitrary and B[1],B[2],...,B[n] have been obtained*)

A:=LinearAlgebra:-IdentityMatrix(n);
#using the multiplication operation of matrix
for i from 1 to n do
   A:=LinearAlgebra:-Multiply(A,B[i]);
od:

return A

help me 

thanks

AoA. How are you? Sir want to generate the attached square matrix for any value of M. Please help.

 

PhD (Scholar)
Department of Mathematics

AoA. How are you? I want to solve the following equation in one step and convenient way please help

 

psi(x):=Matrix(1,3,[x,x-1,x^(2)-x-1])

P := Matrix(3, 3, [1, 2, 1, 0, 1, 1, -1, 2, 3])

U := Matrix(3, 3, [a[1, 1], a[1, 2], a[1, 3], a[2, 1], a[2, 2], a[2, 3], a[3, 1], a[3, 2], a[3, 3]])

u := psi(x)^T*(P^2)^T*U*P^2*psi(t)-t*psi(x)^T*(P^2)^T*U*P^2*psi(1)-x*psi(1)^T*(P^2)^T*U*P^2*psi(t)+t*x*psi(1)^T*(P^2)^T*U*P^2*psi(1)

 

If you reduce my computational work or have any suggestion to solve please give.

PhD (Scholar)
Department of Mathematics

Hello,

I need your help to display the matrix generated by a lenear system.

The linear system is okay, well written, but  there is an error in generate matrix, I get the wrong matrix.

Thank you very much for your help.

 

test.mw

Hi,

I have two all 1.-1  square matrices and want to test whether they are equivalent or not. Can anyone help me with details?Thanks in advance

 

Dear all

I need your help to create a band matrix of n block,   and each block of the matrix is given by:

A=[[1,2,3];[2,1,3]; [3,2,1]]:

Thanks for your help

 

 

I need create a matrix with 3 dimensions, but I don't know how can I do this. The variable that I need store could be write in this form:


>S[i,j,k];

I don't want write this with subscript but like a matrix. 

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