Items tagged with matrix matrix Tagged Items Feed


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

In Maple 18, I'm trying to define a matrix consisting of the output of the diff function from Physics, but it seems to return an empty matrix for some reason.

First, the setup:

(D(x))(t) := x(t)^2+y(t)^2;
(D(y))(t) := x(t)^2-y(t)^2;

Then if I try to input the output of e.g. diff(x'(t),x(t)) directly into a matrix structure, it outputs an empty space for that entry.

I can work around it setting the output of diff into variables first, and then using those in my matrix structure, but that's a bit annoying.

See attached image for input/output




I am trying to differentiate a matrix containing four variables, alpha, alphaB (representing alpha bar), beta, and betaB (for beta bar). They are are variables with respect to t. I then need to let t=0 and then simplify the result with some initial conitions i have. Could you tell me any useful maple functions which i can use to do this? If you need anymore information let me know and thank you for helping me.



Hi everyone,

I am trying to copy a 178x2 matrix into maple. the data is in a .dat file in two columns. For example the first few lines:

+2.000000E-10 +1.636232E-05

+3.017707E-05 +4.531920E-05

+6.065973E-05 +7.586885E-05

+9.096636E-05 +1.059570E-04

+1.208671E-04 +1.357189E-04


i need help to translate a system which is given below to a for loop.

Other wise i am writing it with myself. 

instead of doing it like that 


sys := [galerkin_funcs[1], galerkin_funcs[2], galerkin_funcs[3], galerkin_funcs[4], galerkin_funcs[5], galerkin_funcs[6], galerkin_funcs[7], galerkin_funcs[8], galerkin_funcs[9], galerkin_funcs[10]];

var := [w[1], w[2], w[3], w[4], w[5], w[6]];

Kmat, Fmat := GenerateMatrix(sys, var);

i want to do it like that.


for i to N+4 do

sys(1,i) := galerkin_funcs[i] 

end do

for i to N do

var(1,i) := w[i] 

end do

After that i will generate matrix with this comman Kmat, Fmat := GenerateMatrix(sys, var);

But this for loop i wrote is not doing the i want to do.

Thanks for your help.





I'm trying built a graph in cylindrical coordinates. I have 3 matrix X(20,30); Y(20,30), and temperatura T(20,30). The matrices X and Y are already in cylindrical coordinates. In matlab is just "pcolor (X,Y,T)". Anyone can help me?

X and Y are the coordinates of cylinder discretized (z was not included)

I have this plot in matlab, but i need it in maple.


Good Day Everybody, I m new to maple and would like to translate the following for loop from Matlab to Maple. The FromMatlab Translater didnt work for this expression related to the matrix Q, A, B D and A1. Any help would be greatly appreciated.

Related Matlab Code:



 for i=1:length(R)























Thanks a lot in advance.

I'm trying to write the results of a loop calculation to a file in maple format so that they can be read back in later.

This is a simple example.



for i from 1 to ni do
for j from 1 to nj do

# complicated calculations go here
result:=(x+y)^(i+j); # this is the result (example only)
# write calculated result to file as mat[i,j]:=calculated result; # this is the critical step



read(`outfile`);  # reads in calculated matrix

I don't want to set the result to mat in the loop to avoid memory issues while the terms in mat are calculated.

Does anyone know how to do this?


I have a vector of dimension n with each component being an equation of a linear system.

Can maple convert this Vector to a Matrix-Vector form with the matrix being constant coefficients?


How to Factorize the coefficients of this matrix :


> A:=Matrix([[x^3+x-2,x^2+x],[x,x+1]]);


factor(A) does not work !


Thank you,


Hi everybody.

In the following attached file, I have created 3 matrices with 13*13 and 13*6 dimensions and their components are numeric. I closed Maple and ran it again. Surprisingly, when I try to browse the matrices again, I encounter with this problem " empty RTable structure" while I imported the components, manually.

Thanks in advance for your answers.

I have this matrix

A := Matrix([[x+I*y, z+I*w], [-z+I*w, x-I*y]])

and I want a matrix which components are de real parte of the components of A. I have tried this:


but it doesn't work.

What is wrong?

Thank you so much.

I have this two matrices

uA := Matrix([[-w^2+x^2+y^2-z^2, -2*(w*y+x*z), 2*(-w*x+y*z)], [2*(-w*y+x*z), w^2+x^2-y^2-z^2, -2*(w*z+x*y)], [2*(w*x+y*z), 2*(-w*z+x*y), -w^2+x^2-y^2+z^2]])



UA := eval(uA, {w = -w, x = -x, y = -y, z = -z})


and I want to check that their are the same. I have tried

evalb(uA = UA)


but it says it false. It should say that is true, because - I think- this two matrices are the same.

Does anyone know what is wrong?


Many thanks

I have this matrix


uA := Matrix([[-w^2+x^2+y^2-z^2, -2*(w*y+x*z), 2*(-w*x+y*z)], [2*(-w*y+x*z), w^2+x^2-y^2-z^2, -2*(w*z+x*y)], [2*(w*x+y*z), 2*(-w*z+x*y), -w^2+x^2-y^2+z^2]])

and I would like to evaluate the variables like this


x = -x, y = -y, z = -z, w = -w

I tried this

Eval(uA, x = -x, y = -y, z = -z, w = -w)

but it didnt work.


Any suggestions??


Thank you so much



Hello everybody

In the following attached file, I have used "fnormal" command to omit small numbers that are less than "1e-6" but when I run the maple, I see the numbers such as 2.10^(-11). What's the problem?

Thanks in advance.

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