12-12-2012, 06:19 PM
Solving Problems in Dynamics and Vibrations Using
MATLAB
Solving Problems.pdf (Size: 1.86 MB / Downloads: 312)
An Introduction to MATLAB
Purpose of the Handout
This handout was developed to help you understand the basic features of MATLAB and
also to help you understand the use of some basic functions. This is not a comprehensive
tutorial for MATLAB. To learn more about a certain function, you should use the online
help. For example, if you want to know more about the function ‘solve’, then type the
following command in the command window at the prompt:
help solve
Introduction
MATLAB is a high performance language for technical computing. The name MATLAB
stands for matrix laboratory. Some of the typical uses of MATLAB are given below:
Math and Computation
Algorithm Development
Modeling, Simulation and Prototyping
M-Files
Files that contain code in MATLAB language are called M-Files. You create a M-File
using a text editor and then use them as you would any other MATLAB function or
command. But before using the user defined functions always make sure that the ‘path’ is
set to the current directory. There are two kinds of M-Files:
Scripts, which do not accept input arguments or return output arguments.
Functions, which can accept input and output arguments.
Hold Command
HOLD ON holds the current plot and all axis properties so that subsequent graphing
commands add to the existing graph. HOLD OFF returns to the default mode whereby
PLOT commands erase the previous plots and reset all axis properties before drawing
new plots.