You should know the basic Matlab functionality for
- + * / ^
=
.3.2e-04
means 4 + 5*i
.< > ⇐ >= == ~=
, e.g. 3 < 2
has value false, or 0&& || xor ~
(and, or, exclusive or, not)3 < 2 || 4 > 1
has value true, or 1linspace
and colon syntax, e.g. x = 0:0.01:4
zeros, rand, randn
Ax=b
problems, forming them from story problems or equations and solving in Matlab with \
A(:,3)
is the 3rd column of A
+ - * \ ^ '
- + .* ./ .^
load/save
plot, semilogy, semilogx, loglog
xlabel, ylabel, title, grid on, legend, axis, clf, legend, hold on, hold off
y
as a function of x
from a plotplot
for y = mx + b
semilogy
for y = c 10^(mx)
semilogx
for y = m log x + b
loglog
for y = c x^m
X,Y
matrices with meshgrid
pcolor, contour, contourf, surf, surfc, quiver
colormap
colorbar
You should be able to write short Matlab programs to perform specified computations.
.m
extensionf(x) = @(x) x^2 - 3*x + 2
for
loop to evaluate a sum or productfor
loop to perform a repeated computationYou should have a good grasp of the underlying mathematics and implementation in Matlab code of these labs, i.e. how to …
Ax=b
with Matlab's backslash operatorf
as an anonymous function and calling Matlab's fsolve
function.