Search for notes by fellow students, in your own course and all over the country.
Browse our notes for titles which look like what you need, you can preview any of the notes via a sample of the contents. After you're happy these are the notes you're after simply pop them into your shopping cart.
Title: Introduction to matlab
Description: This document gives a very basic introduction to the commands in matlab for every beginner.
Description: This document gives a very basic introduction to the commands in matlab for every beginner.
Document Preview
Extracts from the notes are below, to see the PDF you'll receive please use the links above
Commands in Matlab
who
shows the variables that have been defined in the command window
whos
gives more inrformation on the variables
clear
clears out all the variables
clear variable_name
clears particular variable
numi = int32(num);
you can change the datatype of a variable
class(num)
this function can be used to see the data type of a variable
intmax and intmin
use these functions to get the max and min values a datatype can take
format
arguments: short;long;loose;compact
the short and long control the size of the answer returned
the loose and compact control the spacing between the command and expression
ellipsis or continuation operator(
...
Matlab can be used
interactively
scripts(series of commands in a file)
fx >>
The matlab prompt
ans
default variable used if an expression is typed at the prompt
Variable Names
must begin with a letter of the alphabet
there is a limit to the length of a name( use namelengthmax function)
case sensitive
The semicolon(;)
suppresses output
Data Types/ Class
single
double
short for double precision
int8/16/32/64 and uint8/16/32/64
numbers represent the amount of bits
one bit is used for the sign (signed)
Unary Operators
operators which operate on a single value
Binary Operators
operators which operate on two or more operands
Precedence of operators (highest --> lowest)
();^;*;/;\;+;functions
there are built in functions
sqrt, cos , sin, tan, log, exp, atan
gamma, erf, besselj
user-defined functions
define
f(x) = x^2 + x + 1;
by f = inline('x^2 + x + 1', 'x') function of one variable
g = inline(’uˆ2 + vˆ2’, ’u’, ’v’) function of two variables
plotting graphs
ezplot is the simplest way to plot a graph
expects a string or symbolic expression
e
Title: Introduction to matlab
Description: This document gives a very basic introduction to the commands in matlab for every beginner.
Description: This document gives a very basic introduction to the commands in matlab for every beginner.