Graphics Programs Reference
In-Depth Information
diary
Writes a transcript of a MATLAB session to a file.
diary <filename>
diary off
diff
Symbolic differentiation operator (also difference operator).
syms x; diff(xˆ3)
diff('x*yˆ2', 'y')
dir
Lists the files in the current working directory. Similar to
ls
.
disp
Displays output without first giving its name.
x = 5.6; disp(x)
syms x; disp(xˆ2)
disp('This will print without quotes.')
double
Gives a double-precision value for either a numeric or symbolic quantity.
Applied to a string,
double
returns a vector of ASCII codes for the characters in
the string.
z = sym('pi'); double(z)
double('think')
dsolve
Symbolic ODE solver. By default, the independent variable is
t
, but a diff-
erent variable can be specified as the last argument.
dsolve('D2y - x*y = 0', 'x')
dsolve('Dy + yˆ2 = 0', 'y(0) = 1', 'x')
[x, y] = dsolve('Dx = 2x + y', 'Dy=-x')
echo
Turns on or off the echoing of commands inside script M-files.
edit
Opens the specified M-file in the Editor/Debugger.
edit mymfile
eig
Computes eigenvalues and eigenvectors of a square matrix.
eig([2, 3; 4, 5])
[e, v] = eig([1, 0, 0; 1, 1, 1; 1, 2, 4])
end
Last entry of a vector. Also a programming command.
v(end)
v(3:end)
eval
Used for evaluating strings as MATLAB expressions. Useful in M-files.
eval('cos(x)')
expand
Expands an algebraic expression.
syms x y; expand((x - y)ˆ2)
Search WWH ::
Custom Search