Recording Voice from Mic in Matlab

Below is sample code for recording voice from mic in matlab:

 

 

RampCalc0.1 – Parametric input for ramp in FE.

This program calculate data of beam, col and slab for ramp. It creates CSV file that can be used in sap2k or any FE package. It requires gnuoctave/matlab to work. You can download it from here:

Scripts Info:

  1. spiral.m = calculate and plot ramp in octave/matlab
  2. beams.m  = calculate data of beam for ramp to be used in FE
  3. cols.m    = calculate data of columns for ramp to be used in FE
  4. slabs.m   = calculate data of triangular slab for ramp to be used in FE

Background Theory:

Circle plot requires x = r*sin(t) and y = r*cos(t) where t increments from 0 to any given radians. If we increment z from 0 to given height h with some increment, and plot with x and y of a circle,  we will get a 3D spiral curve. Two such spiral curve can be used to calculate data point for ramp. Below is the sample code. You can run this by copy and paste directly in gnu octave or matlab or  create script out of it.

Ramp plot in octave
Ramp plot in octave

By using, beams, cols and slabs script function, csv data will be created that can be formatted as per any finite element code. Here I formatted it for sap2K.

Ramp view in sap2k
Ramp view in sap2k

A spreadsheet with sample sap2k format is attached with this code. Below is video tutorial explaining usage of this code:

 

Drafting in Octave/Matlab

Plotting package of octave is very powerful. It can be used to plot architectural drawings. Following steps are required:

  1. Sketching the layout on paper while noting down the points and labeling it.
  2. Afterwards, the coordinates of point is calculated.
  3. Commands of line, gtext and axis limits are used.

For demo, m-file named drawoschool.m (draw octave school) is created which can be downloaded from here

To use this m-file, type:

Architectural Drafting in GNU OCTAVE
Architectural Drafting in GNU OCTAVE

MATLAB Tutorials

Following are MATLAB tutorial available to download:

  1. MATLAB for Civil Engineers
  2. Plotting in MATLAB
  3. Functions and Programming Control Structures in MATLAB
  4. Symbolic, Numerical Calculus and Linear Algebra