Vibrationdata Newsletter

I have posted the January 2012 Newsletter at: http://www.vibrationdata.com/newsletters.htm The topics are: Slow Earthquakes Rumbler Siren Shepard Tones Toadfish Mating Call There are seven accompanying sound files and one Matlab script. Please let me know if you have any questions. Thank you, Tom Irvine

Solve a System of Linear Equations, Ax=B

Here is a Fortran program which solves a system of linear equations: LIN_EQ.F It is compiled via: gfortran -o LIN_EQ LIN_EQ.F -llapack The program uses the LAPACK subroutine: DGESV * * * A version written in C/C++ is given at:  linear_eq.cpp  It is compiled via: gcc… Read more

MPI

Introduction Message Passing Interface (MPI) is a portable library of subprograms which can be used to facilitate parallel computing. The MPI subprograms can be called from C and Fortran programs. Parallel Computing Parallel computing enables large scale numerical problems to be solved in a timely… Read more

GotoBLAS2

MinGW should be installed first. Next… GotoBLAS2 GotoBLAS2 is an implementation of Basic Linear Algebra Subprograms (BLAS). LAPACK uses BLAS. GotoBLAS2 has configurations for a variety of hardware platforms. It builds a library that is optimized for the given PC’s CPU. Make a folder called:… Read more

Matrix Inversion in LAPACK

Here is a Fortran program which performs matrix inversion using the LU decomposition method:  INVERSE_MATRIX.F It is compiled via: gfortran -o INVERSE_MATRIX INVERSE_MATRIX.F -llapack It compiles & runs under both Ubuntu & Cygwin. See also: http://www.nag.com/numeric/fl/nagdoc_fl23/examples/source/f07ajfe.f90 * * * The INVERSE_MATRIX.F program uses the subroutines:… Read more

C/C++ Tips

Passing 1D array as function argument Example… // prototype function declaration void calc(double *x); double a[1000]; int main() { // call calc calc(a); } void calc(double *x) { // do some calculations } *************************************************************** Dynamic Memory Allocation for 1D Array int* a = NULL;     //… Read more

Mixed C++ Fortran Programming

This is another matrix multiplication project using the BLAS function dgemm. It is complied and run in an Ubuntu system. The set consists of two programs:  (right mouse click.  save target or link as) matrix_mult_cf.cpp fort_matmul_main.f The set calculates: C = A*B The C++ program… Read more

Ubuntu Plotting Programs

I am evaluating plotting programs for Ubuntu.  I already have plotting capability via Matlab and Python/matplotlib running under Ubuntu. The Matlab export plot quality is ok but not great. So far my Python knowledge only extends to making static plots.  Identifying interactive, dynamic plotting methods… Read more

MinGW Windows Installation

MinGW stands for Minimalist GNU for Windows. MinGW is a native software port of the GNU Compiler Collection (GCC) and GNU Binutils for use in the development of native Microsoft Windows applications. MinGW can be downloaded with Code::Blocks. Or it can be downloaded via  soureforge.… Read more

C/C++ Read 2D Array

The following program reads a 2D array of numbers.  The array may have an arbitrary or unknown number of rows and columns up to a certain cell limit. The program counts the number of columns and rows as it reads the data. The program souce… Read more