Professional Documents
Culture Documents
IT131-8L Machine Problem Answer Sheet
IT131-8L Machine Problem Answer Sheet
Machine
9 (Matlab Plots) Score
Problem #
Name Alonzo, Isaiah Benjamin B. Section A11
mpplot1.m
x = randi(100,1);
y = randi(100,1);
plot(x,y,'g+');
subfnfn.m
function subfnfn(funA,funB)
n = randi([5,10],1);
x = 1:n;
y = funA(x);
y2 = funB(x);
for i = 1:2
if i == 1
subplot(1,2,i);
plot(x,y,'ko');
title(sprintf('%s',func2str(funA)));
else
subplot(1,2,i)
plot(x,y2,'ko');
title(sprintf('%s',func2str(funB)));
end
end