matrix computation

October 29 2007 by sungyg 125
false

0


Dear Sir: I am still a novice to use the maple. Please give some advice for the following code. Expecially, I try to construct the final P(3x3) matrix. In the for-loop, normalized vectors are generated. Then, those are converted into a matrix. But, I do not know how to write a code. restart: with(LinearAlgebra): interface(displayprecision=4): mass:=Matrix([[m[1],0,0],[0,m[2],0],[0,0,m[3]]]); stif:=Matrix([[k[1]+k[2],-k[1],0],[-k[1],k[1]+k[2],-k[2]],[0,-k[2],k[2]]]); m[1],m[2],m[3],k[1],k[2],k[3]:=4,4,4,4,4,4; msri:=simplify(MatrixFunction(mass,sqrt(x),x)^(-1)); mass2:=msri.mass.msri; stif2:=msri.stif.msri; v,C:=evalf(Eigenvectors(stif2)); for i from 1 to 3 do P[1..3,i]:=Normalize(C[1..3,i],Euclidean) end do; Thanks
 
Loading Comments & Answers

You must be logged into your MaplePrimes account in order to post a comment. If you don't have an account, you can create an account here.

     

Forgot Your Password? Create an Account