Scilab is an open source, cross-platform numerical computational package and a high-level, numerically oriented programming language. It can be used for signal processing, statistical analysis, image enhancement, fluid dynamics simulations, numerical optimization, and modeling and simulation of explicit and implicit dynamical systems.

Scilab is an open source alternative to MATLAB.

Scilab may be freely downloaded from:

http://www.scilab.org/

* * *

Here is a scilab script for calculating the eigenvalues and eigenvectors for a two-degree-of-freedom system.

The script sorts both the eigenvalues and eigenvectors.

The stiffness matrix k and the mass matrix m are hardwired into the script.

spec(k,m) is the function which actually solves the problem, but some post-processing is required.

k=[9.2 -4.6; -4.6 4.6]*(1.0e+04)

m=[2 0; 0 5]/386

[al,be,R]=spec(k,m);

eig=al./be;

[s,k]=gsort(eig,’g’,’i’);

om2=s;

omegan=sqrt(om2);

fn=omegan/(2*%pi);

disp ‘natural frequencies (Hz)’

fn

eigenvectors=R(:,k);

eigenvectors

* * *

A script for solving the generalized eigenvalue problem where the mass and stiffness matrices are read in from files is given at:

http://www.vibrationdata.com/scilab/generalized_eigen_read.sci

* * *

A script for calculating the descriptive statistics for a time history signal is given at:

http://www.vibrationdata.com/scilab/signal_stats.sci

* * *

Tom Irvine

### Like this:

Like Loading...