Simulation Portfolio For APM 3714
Simulation Portfolio For APM 3714
Simulation Portfolio For APM 3714
sign = v(n)*v(n+1);
Look at the above programme and find out what is wrong. Discuss as
students and correct if necessary.
Program number 2. Use octave online to play with this programme.
clear; clc;
V=roots(C)
C_recalc=poly(V)
fprintf('\n\n');
% complex roots)
W=roots(D)
fprintf('roots are:\n');
re=real(W)
im=imag(W)
W_recalc=poly(W)
Look at the above programme and find out what is wrong. Discuss
Tutorials. Number 3
Exercise two:
2.1. Solve the following system of equation using the inverse matrix function and
the Gauss elimination method.
3X1+2X2-X3=10
-X1+3X2+2X3=5
X1-X2-X3=-1
Hint use: INV is the solution using matrix inverse function: INV=inv(A)*C
GAUSS is the solution using Gauss elimination method: Gauss=A\C
2.3.
Find all the zeroes of f(x) = x - tanx in the interval (0, 20) by the method of bisection.
Utilize the functions rootsearch and bisect in MATLAB or octave
RESOURCES
Dear Student,
please go to and practice on how to programme with MATLAB or OCTAVE.
Follow the links below:
https://app.knovel.com/web/view/khtml/show.v/rcid:kpNMESCCM3/cid:kt011QBMQA/v
iewerType:khtml/?b-q=matlab&view=collapsed&zoom=1&page=14
https://app.knovel.com/web/view/khtml/show.v/rcid:kpEMATLA08/cid:kt0112Y9T4/vie
werType:khtml//root_slug:2-matlab-fundamentals/url_slug:matlab-fundamentals?b-
q=matlab&sort_on=default&b-subscription=true&b-group-by=true&b-sort-on=default&b-
content-type=all_references&include_synonyms=no&b-toc-cid=kpEMATLA08&b-toc-root-
slug=&b-toc-url-slug=matlab-fundamentals&b-toc-
title=Essential%20MATLAB%20for%20Engineers%20and%20Scientists%20(6th%20Edition)
&page=4&view=collapsed&zoom=1
https://app.knovel.com/web/toc.v/cid:kpMATLABE1/viewerType:toc//root_slug:matlab-
electrical-computer/url_slug:matlab-electrical-computer?b-
q=matlab&sort_on=default&b-subscription=true&b-group-by=true&b-sort-on=default&b-
content-type=all_references&include_synonyms=no
https://www.youtube.com/watch?v=sHGqwF2s-tM
https://www.youtube.com/watch?v=bmE6SWE6c_A