macmp91

10 Reputation

One Badge

7 years, 173 days

MaplePrimes Activity


These are questions asked by macmp91

Hi! I need a help to understand how the variables in maple 17 works

I want to know if it's possible to change a variable, that I have already declared in a proc, along the body of a procedure. For example this procedure:

>Bucklingload:= proc(a,b,c,d,Q,pr)
local A;
A:=FN(a,b,c,d,Q); #vector of another gobal variable
while A[1] >0 do
Q:=Q+pr ;#"Q"and "pr" are both a list, wich the first value of the vector B decrease his value after an increase estimated in "pr" in "Q"
A[1];
end do;
end proc;

After execute the worksheet, maple display this message:" illegal use of a formal parameter ". I want to know if its possible to use Q as a local variable chaging his value in this loop

Thank you all and sorry for my english!

I solve a mechanical exercise but i had a problem.

I know M (mass) and K (stifness) matrices (4x4).

I want to solve the (λ2M+K)v=0  eigenvalue problem, where λ are the eigenvalues and v eigenvectors.

How can i solve this problem.  I tried with the Eigenvectors() command but it didn't give the right solution.

The Eigenvalues are okay, but the eigenvectors not

K := Matrix([[4*10^7,-1.50*10^7,2*10^7,0],[-1.50*10^7,1.50*10^7,0,1.50*10^7],[2*10^7,0,8*10^7,2*10^7],[0,1.50*10^7,2*10^7,4*10^7]]);

M:=Matrix([[121.90,99.048,-91.429,0],[99.048,594.29,0,-99.048],[-91.429,0,243.81,-91.429],[0,-99.048,-91.429,121.90]]);

w1,w2:=Eigenvectors(K,M);

Acoording with the book the right eigenvectors(shape mode) are:

[0.013 991,  0.034 233,  0.073 683,  0.090 573]
[0.035 637, 0, -0.032 213, 0]
[0 ,-0.034 233, 0, 0.090 573]
[-0.013 991, 0.034 233, -0.073 683, 0.090 573]

Thank you
 

I need to create a list of matrices.


with(LinearAlgebra):
interface(rtablesize=50);
E:=[E1,E2,E3]:
P:=[0,1,2]:
N:=3:
B:=[1,2,3]:
for b from 1 to 12 by 5 do
B:=(i,j)->
if i=b+P[a] and j=b+P[a] then E[a]
elif i=b+P[a] and j=b+N+2+P[a] then -E[a]
elif i=b+P[a]+N+2 and j=b+P[a] then -E[a]
elif i=b+P[a]+N+2 and j=b+P[a]+N+2 then E[a]
else 0:
end if:
B[b]:=add(i,i=[seq(Matrix(20,B), a=1..3)]);
end do;
H:=[seq(B[b],b=1..12,5)];

It isn't indexing the first and second variable, only the last one was indexed. 

Page 1 of 1