This document provides a summary of MATLAB commands and functions organized into categories such as general purpose commands, input/output commands, vector/matrix commands, plotting commands, programming commands, mathematical functions, and numerical methods. It lists commonly used commands like plot, print, zeros, ones, mean, and dsolve and provides brief descriptions of what each command/function does.
A basic overview, application and usage of MATLAB for engineers. It covered very basics essential that will help one to get started with MATLAB programming easily.
Provided by IDEAS2IGNITE
We discussed most of what one wishes to learn in vector calculus at the undergraduate engineering level. Its also useful for the Physics ‘honors’ and ‘pass’ students.
This was a course I delivered to engineering first years, around 9th November 2009. But I have added contents to make it more understandable, eg I added all the diagrams and many explanations only now; 14-18th Aug 2015.
More such lectures will follow soon. Eg electromagnetism and electromagnetic waves !
A basic overview, application and usage of MATLAB for engineers. It covered very basics essential that will help one to get started with MATLAB programming easily.
Provided by IDEAS2IGNITE
We discussed most of what one wishes to learn in vector calculus at the undergraduate engineering level. Its also useful for the Physics ‘honors’ and ‘pass’ students.
This was a course I delivered to engineering first years, around 9th November 2009. But I have added contents to make it more understandable, eg I added all the diagrams and many explanations only now; 14-18th Aug 2015.
More such lectures will follow soon. Eg electromagnetism and electromagnetic waves !
These Slides are very usefull interms of engineering and as well as in other fields of Study .. These are Related with linear Algebra and there Properties Methods to find out the unknowns from the equation...
These Slides are very usefull interms of engineering and as well as in other fields of Study .. These are Related with linear Algebra and there Properties Methods to find out the unknowns from the equation...
Introduction to Matlab
Lecture 1:
Introduction: What is Matlab, History of Matlab, strengths, weakness
Getting familiar with the interface: Layout, Pull down menus
Creating and manipulating objects: Variables (scalars, vectors, matrices, text strings), Operators (arithmetic, relational, logical) and built-in functions
The Roman Empire A Historical Colossus.pdfkaushalkr1407
The Roman Empire, a vast and enduring power, stands as one of history's most remarkable civilizations, leaving an indelible imprint on the world. It emerged from the Roman Republic, transitioning into an imperial powerhouse under the leadership of Augustus Caesar in 27 BCE. This transformation marked the beginning of an era defined by unprecedented territorial expansion, architectural marvels, and profound cultural influence.
The empire's roots lie in the city of Rome, founded, according to legend, by Romulus in 753 BCE. Over centuries, Rome evolved from a small settlement to a formidable republic, characterized by a complex political system with elected officials and checks on power. However, internal strife, class conflicts, and military ambitions paved the way for the end of the Republic. Julius Caesar’s dictatorship and subsequent assassination in 44 BCE created a power vacuum, leading to a civil war. Octavian, later Augustus, emerged victorious, heralding the Roman Empire’s birth.
Under Augustus, the empire experienced the Pax Romana, a 200-year period of relative peace and stability. Augustus reformed the military, established efficient administrative systems, and initiated grand construction projects. The empire's borders expanded, encompassing territories from Britain to Egypt and from Spain to the Euphrates. Roman legions, renowned for their discipline and engineering prowess, secured and maintained these vast territories, building roads, fortifications, and cities that facilitated control and integration.
The Roman Empire’s society was hierarchical, with a rigid class system. At the top were the patricians, wealthy elites who held significant political power. Below them were the plebeians, free citizens with limited political influence, and the vast numbers of slaves who formed the backbone of the economy. The family unit was central, governed by the paterfamilias, the male head who held absolute authority.
Culturally, the Romans were eclectic, absorbing and adapting elements from the civilizations they encountered, particularly the Greeks. Roman art, literature, and philosophy reflected this synthesis, creating a rich cultural tapestry. Latin, the Roman language, became the lingua franca of the Western world, influencing numerous modern languages.
Roman architecture and engineering achievements were monumental. They perfected the arch, vault, and dome, constructing enduring structures like the Colosseum, Pantheon, and aqueducts. These engineering marvels not only showcased Roman ingenuity but also served practical purposes, from public entertainment to water supply.
Instructions for Submissions thorugh G- Classroom.pptxJheel Barad
This presentation provides a briefing on how to upload submissions and documents in Google Classroom. It was prepared as part of an orientation for new Sainik School in-service teacher trainees. As a training officer, my goal is to ensure that you are comfortable and proficient with this essential tool for managing assignments and fostering student engagement.
2024.06.01 Introducing a competency framework for languag learning materials ...Sandy Millin
http://sandymillin.wordpress.com/iateflwebinar2024
Published classroom materials form the basis of syllabuses, drive teacher professional development, and have a potentially huge influence on learners, teachers and education systems. All teachers also create their own materials, whether a few sentences on a blackboard, a highly-structured fully-realised online course, or anything in between. Despite this, the knowledge and skills needed to create effective language learning materials are rarely part of teacher training, and are mostly learnt by trial and error.
Knowledge and skills frameworks, generally called competency frameworks, for ELT teachers, trainers and managers have existed for a few years now. However, until I created one for my MA dissertation, there wasn’t one drawing together what we need to know and do to be able to effectively produce language learning materials.
This webinar will introduce you to my framework, highlighting the key competencies I identified from my research. It will also show how anybody involved in language teaching (any language, not just English!), teacher training, managing schools or developing language learning materials can benefit from using the framework.
How to Create Map Views in the Odoo 17 ERPCeline George
The map views are useful for providing a geographical representation of data. They allow users to visualize and analyze the data in a more intuitive manner.
We all have good and bad thoughts from time to time and situation to situation. We are bombarded daily with spiraling thoughts(both negative and positive) creating all-consuming feel , making us difficult to manage with associated suffering. Good thoughts are like our Mob Signal (Positive thought) amidst noise(negative thought) in the atmosphere. Negative thoughts like noise outweigh positive thoughts. These thoughts often create unwanted confusion, trouble, stress and frustration in our mind as well as chaos in our physical world. Negative thoughts are also known as “distorted thinking”.
Unit 8 - Information and Communication Technology (Paper I).pdfThiyagu K
This slides describes the basic concepts of ICT, basics of Email, Emerging Technology and Digital Initiatives in Education. This presentations aligns with the UGC Paper I syllabus.
1. MATLAB Commands and Functions
Dr. Brian Vick
Mechanical Engineering Department
Virginia Tech
General Purpose Commands
Operators and Special Characters / 3
Commands for Managing a Session / 3
Special Variables and Constants / 4
System and File Commands / 4
Input/Output and Formatting Commands
Input/Output Commands / 5
Format Codes for fprintf and fscanf / 5
Numeric Display Formats / 5
Vector, Matrix and Array Commands
Array Commands / 6
Special Matrices / 6
Matrix Arithmetic / 6
Matrix Commands for Solving Linear Equations / 6
Cell Array Functions / 7
Structure Functions / 7
Plotting Commands
Basic xy Plotting Commands / 8
Plot Enhancement Commands / 8
Specialized Plot Commands / 8
Colors, Symbols and Line Types / 9
Three-Dimensional Plotting Commands / 9
Histogram Functions / 9
MATLAB Commands – 1
2. Programming
Logical and Relational Operators / 10
Program Flow Control / 10
Logical Functions / 10
M-Files / 11
Timing /11
Mathematical Functions
Exponential and Logarithmic Functions / 12
Trigonometric Functions / 12
Hyperbolic Functions / 12
Complex Functions / 13
Statistical Functions / 13
Random Number Functions / 13
Numeric Functions / 13
String Functions / 13
Numerical Methods
Polynomial and Regression Functions / 14
Interpolation Functions / 14
Numerical Integration Functions / 14
Numerical Differentiation Functions / 14
ODE Solvers / 15
Predefined Input Functions / 15
Symbolic Math Toolbox
Functions for Creating and Evaluating Symbolic Expressions / 16
Functions for Manipulating Symbolic Expressions / 16
Symbolic Calculus Functions / 16
Symbolic Solution of Algebraic and Transcendental Equations / 17
Symbolic Solution of Differential Equations / 17
Laplace Transform Functions / 17
Symbolic Linear Algebra Functions / 17
MATLAB Commands – 2
3. General Purpose Commands
Operators and Special Characters
+
*
.*
^
.^
/
.
./
:
( )
[ ]
.
…
,
;
%
_
._
=
Plus; addition operator.
Minus; subtraction operator.
Scalar and matrix multiplication operator.
Array multiplication operator.
Scalar and matrix exponentiation operator.
Array exponentiation operator.
Left-division operator.
Right-division operator.
Array left-division operator.
Array right-division operator.
Colon; generates regularly spaced elements and represents an entire row or column.
Parentheses; encloses function arguments and array indices; overrides precedence.
Brackets; enclosures array elements.
Decimal point.
Ellipsis; line-continuation operator.
Comma; separates statements and elements in a row.
Semicolon; separates columns and suppresses display.
Percent sign; designates a comment and specifies formatting.
Quote sign and transpose operator.
Nonconjugated transpose operator.
Assignment (replacement) operator.
Commands for Managing a Session
clc
clear
exist
global
help
lookfor
quit
who
whos
Clears Command window.
Removes variables from memory.
Checks for existence of file or variable.
Declares variables to be global.
Searches for a help topic.
Searches help entries for a keyword.
Stops MATLAB.
Lists current variables.
Lists current variables (long display).
MATLAB Commands – 3
4. Special Variables and Constants
ans
eps
i,j
Inf
NaN
pi
Most recent answer.
Accuracy of floating-point precision.
The imaginary unit - 1.
Infinity.
Undefined numerical result (not a number).
The number p .
System and File Commands
cd
date
delete
diary
dir
load
path
pwd
save
type
what
wklread
Changes current directory.
Displays current date.
Deletes a file.
Switches on/off diary file recording.
Lists all files in current directory.
Loads workspace variables from a file.
Displays search path.
Displays current directory.
Saves workspace variables in a file.
Displays contents of a file.
Lists all MATLAB files in the current directory.
Reads .wk1 spreadsheet file.
MATLAB Commands – 4
5. Input/Output and Formatting Commands
Input/Output Commands
disp
fscanf
format
fprintf
input
;
Displays contents of an array or string.
Read formatted data from a file.
Controls screen-display format.
Performs formatted writes to screen or file.
Displays prompts and waits for input.
Suppresses screen printing.
Format Codes for fprintf and fscanf
%s
%d
%f
%e
%g
n
t
Format as a string.
Format as an integer.
Format as a floating point value.
Format as a floating point value in scientific notation.
Format in the most compact form: %f or %e.
Insert a new line in the output string.
Insert a tab in the output string.
Numeric Display Formats
format
format
format
format
format
format
format
format
format
short
long
short e
long e
bank
+
rat
compact
loose
Four decimal digits (default).
16 decimal digits.
Five digits plus exponent.
16 digits plus exponents.
Two decimal digits.
Positive, negative, or zero.
Rational approximation.
Suppresses some line feeds.
Resets to less compact display mode.
MATLAB Commands – 5
6. Vector, Matrix and Array Commands
Array Commands
cat
find
length
linspace
logspace
max
min
prod
reshape
size
sort
sum
Concatenates arrays.
Finds indices of nonzero elements.
Computers number of elements.
Creates regularly spaced vector.
Creates logarithmically spaced vector.
Returns largest element.
Returns smallest element.
Product of each column.
Change size
Computes array size.
Sorts each column.
Sums each column.
Special Matrices
eye
ones
zeros
Creates an identity matrix.
Creates an array of ones.
Creates an array of zeros.
Matrix Arithmetic
cross
dot
Computes cross products.
Computes dot products.
Matrix Commands for Solving Linear Equations
det
inv
pinv
rank
rref
Computes determinant of an array.
Computes inverse of a matrix.
Computes pseudoinverse of a matrix.
Computes rank of a matrix.
Computes reduced row echelon form.
MATLAB Commands – 6
7. Cell Array Functions
cell
celldisp
cellplot
num2cell
deal
iscell
Creates cell array.
Displays cell array.
Displays graphical representation of cell array.
Converts numeric array to cell array.
Matches input and output lists.
Identifies cell array.
Structure Functions
fieldnames
getfield
isfield
isstruct
rmfield
setfield
struct
Returns field names in a structure array.
Returns field contents of a structure array.
Identifies a structure array field.
Identifies a structure array.
Removes a field from a structure array.
Sets contents of field.
Creates structure array.
MATLAB Commands – 7
8. Plotting Commands
Basic xy Plotting Commands
axis
fplot
grid
plot
print
title
xlabel
ylabel
Sets axis limits.
Intelligent plotting of functions.
Displays gridlines.
Generates xy plot.
Prints plot or saves plot to a file
Puts text at top of plot.
Adds text label to x-axis.
Adds text label to y-axis.
Plot Enhancement Commands
axes
close
close all
figure
gtext
hold
legend
refresh
set
subplot
text
Creates axes objects.
Closes the current plot.
Closes all plots.
Opens a new figure window.
Enables label placement by mouse.
Freezes current plot.
Legend placement by mouse.
Redraws current figure window.
Specifies properties of objects such as axes.
Creates plots in subwindows.
Places string in figure.
Specialized Plot Commands
bar
loglog
polar
semilogx
semilogy
stairs
stem
Creates bar chart.
Creates log-log plot.
Creates polar plot.
Creates semilog plot (logarithmic abscissa).
Creates semilog plot (logarithmic ordinate).
Creates stairs pot.
Creates stem plot.
MATLAB Commands – 8
9. Colors, Symbols and Line Types
Color
y
m
c
r
g
b
w
k
yellow
magenta
cyan
red
green
blue
white
black
Symbol
.
o
x
+
*
d
v
^
<
>
p
h
point
circle
x-mark
plus
star
diamond
triangle (down)
triangle (up)
triangle (left)
triangle (right)
pentagram
hexagram
Line
:
-.
--
solid
dotted
dash dotted
dashed
Three-Dimensional Plotting Commands
contour
mesh
meshc
meshz
plot3
surf
surfc
meshgrid
waterfall
zlabel
Creates contour plot.
Creates three-dimensional mesh surface plot.
Same as mesh with contour plot underneath.
Same as mesh with vertical lines underneath.
Creates three-dimensional plots from lines and points.
Creates shaded three-dimensional mesh surface plot.
Same as surf with contour plot underneath.
Creates rectangular grid.
Same as mesh with mesh lines in one direction.
Adds text label to z-axis.
Histogram Functions
bar
hist
histc
Creates a bar chart.
Aggregates the data into equally spaced bins.
Aggregates the data into unequally spaced bins.
MATLAB Commands – 9
10. Programming
Logical and Relational Operators
==
~=
<
<=
>
>=
&
|
~
xor
Relational operator: equal to.
Relational operator: not equal to.
Relational operator: less than.
Relational operator: less than or equal to.
Relational operator: greater than.
Relational operator: greater than or equal to.
Logical operator: AND.
Logical operator: OR.
Logical operator: NOT.
Logical operator: EXCLUSIVE OR.
Program Flow Control
break
case
else
elseif
end
error
for
if
otherwise
return
switch
warning
while
Terminates execution of a loop.
Provides alternate execution paths within switch structure.
Delineates alternate block of statements.
Conditionally executes statements.
Terminates for, while, and if statements.
Display error messages.
Repeats statements a specific number of times
Executes statements conditionally.
Default part of switch statement.
Return to the invoking function.
Directs program execution by comparing point with case expressions.
Display a warning message.
Repeats statements an indefinite number of times.
Logical Functions
any
all
find
finite
isnan
isinf
isempty
isreal
True if any elements are nonzero.
True if all elements are nonzero.
Finds indices of nonzero elements.
True if elements are finite.
True if elements are undefined.
True if elements are infinite.
True if matrix is empty.
True if all elements are real.
MATLAB Commands – 10
11. M-Files
eval
feval
function
global
nargin
nargout
script
Interpret strings containing Matlab expressions.
Function evaluation.
Creates a user-defined function M-file.
Define global variables.
Number of function input arguments.
Number of function output arguments.
Script M-files
Timing
cputime
clock
tic, toc
CPU time in seconds.
Current date and time as date vector.
Start, stop a stopwatch timer.
MATLAB Commands – 11
13. Complex Functions
abs(x)
angle(x)
conj(x)
imag(x)
real(x)
Absolute value; |x|.
Angle of a complex number x.
Complex conjugate of x.
Imaginary part of a complex number x.
Real part of a complex number x.
Statistical Functions
erf(x)
mean
median
std
Computes the error function erf (x).
Calculates the average.
Calculates the median.
Calculates the standard deviation.
Random Number Functions
rand
randn
Generates uniformly distributed random numbers between 0 and 1.
Generates normally distributed random numbers.
Numeric Functions
ceil
fix
floor
round
sign
Rounds to the nearest integer toward •.
Rounds to the nearest integer toward zero.
Rounds to the nearest integer toward - •.
Rounds towards the nearest integer.
Signum function.
String Functions
findstr
strcmp
char
Finds occurrences of a string.
Compares strings.
Creates character string array
MATLAB Commands – 13
14. Numerical Methods
Polynomial and Regression Functions
conv
deconv
eig
poly
polyfit
polyval
roots
Computes product of two polynomials
Computes ratio of polynomials.
Computes the eigenvalues of a matrix.
Computes polynomial from roots.
Fits a polynomial to data.
Evaluates polynomial and generates error estimates.
Computes polynomial roots.
Interpolation Functions
interp1
interp2
spline
unmkpp
Linear and cubic-spline interpolations of a function of one variable.
Linear interpolation of a function of two variables.
Cubic-spline interpolation.
Computes the coefficients of cubic-spine polynomials.
Root Finding and Minimization
fmin
fmins
fzero
Finds minimum of single-variable function.
Finds minimum of multivariable function.
Finds zero of single-variable function.
Numerical Integration Functions
quad
quadl
trapz
Numerical integration with adaptive Simpson’s rule.
Numerical integration with adaptive Lobatto quadrature.
Numerical integration with the trapezoidal rule.
Numerical Differentiation Functions
diff(x)
polyder
Computes the difference between adjacent elements in the vector x.
Differentiates a polynomial, a polynomial product, or a polynomial quotient.
MATLAB Commands – 14
16. Symbolic Math Toolbox
Functions for Creating and Evaluating Symbolic Expressions
class
digits
double
ezplot
findsym
numden
sym
syms
vpa
Returns the class of an expression.
Sets the number of decimal digits used to do variable precision arithmetic.
Converts an expression to numeric form.
Generates a plot of a symbolic expression.
Finds the symbolic variables in a symbolic expression.
Returns the numerator and denominator of an expression.
Creates a symbolic variable.
Creates one or more symbolic variables.
Sets the number of digits used to evaluate expressions.
Functions for Manipulating Symbolic Expressions
collect
expand
factor
poly2sym
pretty
simple
simplify
subs
sym2poly
Collects coefficients of like powers in an expression.
Expands an expression by carrying out jpowers.
Factors an expression.
Converts a polynomial coefficient vector to a symbolic polynomial.
Displays an expression in a form that resembles typeset mathematics.
Searches for the shortest form of an expression.
Simplifies an expression using Maple’s simplification rules.
Substitutes variables or expressions.
Converts an expression to a polynomial coefficient vector.
Symbolic Calculus Functions
diff
Dirac
Heaviside
int
limit
symsum
taylor
Returns the derivative of an expression.
Dirac delta function (unit impulse).
Heaviside function (unit step).
Returns the integral of an expression.
Returns the limit of an expression.
Returns the symbolic summation of an expression.
Returns the Taylor series of a function.
MATLAB Commands – 16
17. Symbolic Solution of Algebraic and Transcendental Equations
solve
Solves symbolic equations.
Symbolic Solution of Differential Equations
dsolve
Returns a symbolic solution of a differential equation or set of equations.
Laplace Transform Functions
ilaplace
laplace
Returns the inverse Laplace transform.
Returns the Laplace transform.
Symbolic Linear Algebra Functions
det
eig
inv
poly
Returns the determinant of a matrix.
Returns the eigenvalues (characteristic roots) of a matrix.
Returns the inverse of a matrix.
Returns the characteristic polynomial of a matrix.
MATLAB Commands – 17