0% found this document useful (0 votes)
129 views34 pages

Matlab & Structural Dynamics

This document introduces MATLAB and structural dynamics. It summarizes MATLAB as a high-performance computation and visualization tool. It discusses MATLAB's workspace, command window, matrices, arrays, operations on arrays, solutions to equations, eigenvalues and eigenvectors, symbolic operations, and graphics. It then defines structural systems using mass, damping, and stiffness and derives the state space representation and equations of motion. An example single-story structure is presented.

Uploaded by

Ahmed Mandor
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
129 views34 pages

Matlab & Structural Dynamics

This document introduces MATLAB and structural dynamics. It summarizes MATLAB as a high-performance computation and visualization tool. It discusses MATLAB's workspace, command window, matrices, arrays, operations on arrays, solutions to equations, eigenvalues and eigenvectors, symbolic operations, and graphics. It then defines structural systems using mass, damping, and stiffness and derives the state space representation and equations of motion. An example single-story structure is presented.

Uploaded by

Ahmed Mandor
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPT, PDF, TXT or read online on Scribd
You are on page 1/ 34

Matlab

&
structural Dynamics
Introduction to Matlab
What is MATLAB?
􀂆 high-performance software
􀂄 Computation
􀂄 Visualization
􀂄 Easy-to-use environment.
􀂆 high-level language
􀂄 Data types
􀂄 Functions
􀂄 Control flow statements
􀂄 Input/output
􀂄 Graphics
􀂄 Object-oriented
programming capabilities
Workspace

Command window

Command
History
Calculations at the Command Line
MATLAB as a calculator Assigning Variables
Matrices
􀂆 Entering and Generating Matrices
􀂆 Subscripts
􀂆 Scalar Expansion
􀂆 Concatenation
􀂆 Deleting Rows and Columns
􀂆 Array Extraction
􀂆 Matrix and Array Multiplication
Entering Numeric Arrays

Row separator
semicolon (;)

Column separator
space / comma (,)
The Matrix in MATLAB
Entering Numeric Arrays
Generating basic matrices

Matrix with ZEROS: Matrix with Random numbers


>> Z = zeros (r, c) >> R = rand (r, c)

Matrix with ONES:


>> O = ones (r, c)

IDENTITY Matrix:
>> I = eye (r, c)

r  Rows
c  Columns
zeros, ones, eye, rand  Matlab functions
Operation on Arrays
Operation on Arrays
Addition:
>> C = A + B

Subtraction:
>> D = A – B

Multiplication:
>> E = A * B (Matrix multiplication)
>> E = A .* B (Element wise multiplication)

Division:
Left Division and Right Division
>> F = A . / B (Element wise division)
>> F = A / B (A * inverse of B)
>> F = A . \ B (Element wise division)
>> F = A \ B (inverse of A * B)
Operation on Arrays
Solution of equations

3 x 1  2 x 2  x 3  11
2 x 1  x 2  2 x 3  1
4 x 1  x 2  x 3  12

3 2 1   x 1   11 
2  1 2   x    1
  2  
4 1  1  x 3  12 

AX=B X = A-1 B
EigenValues & EigenVectors
Symbolic operations
Graphics
in Matlab
Introduction to
Structural Dynamics
Define structure (System)
m x  c x  k x  F
y1  x
Assume
y 2  x

m x  F  k x  c x
k c F
x   x  x 
m m m
k c F y1  x
x   x  x 
m m m y 2  x

x  x
y 1  y 2
k c F
y 2   y1  y 2 
m m m
y 1  y 2
k c F
y 2   y1  y 2 
m m m

 1
y
  0 1   1
y  0 

 y    k c      1 F
 2   m    y2   
m m
Y  A Y  Bf
 1
y
  0 1   1
y  0 

 y   k c      1 F
 2   m    y2   
m m
  A Y  Bf
Y

 y1   0 1  0
Y   , A   k c , B   1 
y
 2      
 m m m
y1  x
y 2  x

 x  1 0   y 1   0 
 x   0 1  y   0 F
    2  
X  CY  Df
x  1 0 0 
X   , C    ,D 
 x  0 1  0 
State Space Form
m x  c x  k x  F

  A Y  Bf
Y
X  CY  Df
 1
y  0 1   0 
Y   , A   k c , B   1 
y
 2 
 m    
m m
x  1 0  0 
X   , C    ,D 
 x  0 1  0 
In Matlab

Sys = ss (A, B, C, D)

Application :

Response x = initial (Sys, xo, t)

System Time
Initial Condition
In Matlab

Sys = ss (A, B, C, D)

Application :

Response x = lsim (Sys, f, t)

System Time
Force
Example :
Single story structure :

K = 250 t/m
m = 10 t/m.sec2
xo=0.1 m vo = 0

 0 1   0 1
A k c 

 m    25 0
m

You might also like