Sponsored links: Algebra eBooks
 

Help Index

A

B

C

D

E

F

G

H

I

J

K

L

M

N

O

P

Q

R

S

T

U

V

W

X

Y

Z

The Maxima on-line user's manual

Algebra Calculator

Search:

Matrix_size

Function: matrix_size (<M>) Return a two member list that gives the number of rows and columns, respectively of the matrix <M>.

kill(all);
load("vect");
load("linearalgebra");
ratprint:false;
l:1.1;
d1:70e-3;
p:470;
M1:350;
d2:90e-3;
F1:570;
E:205E9;
Iz1:d1^4*%pi/64;
Iz2:d2^4*%pi/64;
omega : x^2*(x-5*l);
NapprMax:8;
v:makelist(0,x,0,NapprMax);
phi:makelist(0,x,0,NapprMax);
B:zeromatrix(NapprMax+1,1);
B:omega;
B1:diff(B,x);
B2:diff(B1,x);
S:(integrate(Iz2*E*B2*B2,x,0,3*l)+integrate(Iz1*E*B2*B2,x,3*l,5*l));
Q:bfloat(integrate(-p*B,x,0,3*l)+(-F1)*subst(x=4*l,B)+(M1)*subst(x=3*l,B1));
A1:Q/S;
v[1]:B*A1;
phi[1]:B1*A1;
for Nappr from 1 thru NapprMax do (    B:zeromatrix(Nappr+1,1),    for i from 1 thru Nappr+1 do B[i,1]:omega*x^(i-1),    Bt:transpose(B),    B1:diff(B,x),    B2:diff(B1,x),    B2t:transpose(B2),    S:(integrate(Iz2*E*B2.B2t,x,0,3*l)+integrate(Iz1*E*B2.B2t,x,3*l,5*l)),    Q:bfloat(integrate(-p*B,x,0,3*l)+(-F1)*subst(x=4*l,B)+(M1)*subst(x=3*l,B1)),    A1:(invert(S)).transpose(Q),/*A1:S,print(matrix_size(invert(S))),print(matrix_size(Q)),invert(S).Q,*/    v[Nappr+1]:Bt.A1,    phi[Nappr+1]:(transpose(B1).A1));
eredmeny:[subst(x=3*l,v),subst(x=3*l,phi)];
eredmeny:float(eredmeny);
1000*eredmeny[1];
float(eredmeny[2]*180/%pi);
plot2d(v,[x,0,5*l],[legend,"0^{th}","1^{st}","2^{nd}","3^{rd}","4^{th}","5^{th}","6^{th}","7^{th}","8^{th}"]);
plot2d(v,[x,0,5*l],[legend,"0^{th}","1^{st}","2^{nd}","3^{rd}","4^{th}","5^{th}","6^{th}","7^{th}","8^{th}"]);

(%o1)                                true
(%i2) 

Related Examples

matrix_size

? matrix_size;

Calculate

matrix_size

? matrix_size;

Calculate