home

Scientific Computing (Psychology 9040a)

Fall, 2021

Do not fear the figure: sample solution


x = 1:20;
y1 = randn(1,20);

figure

subplot(5,5,2:5); plot(x,y1,'b+-'); axis off
subplot(5,5,7:10); plot(x,y1,'b+-'); axis off
subplot(5,5,12:15); plot(x,y1,'b+-'); axis off
subplot(5,5,17:20); plot(x,y1,'b+-'); axis off
subplot(5,5,22:25); plot(x,y1,'b+-'); axis off
subplot(5,5,1); plot(0,0,'rs','markersize',50); axis off
subplot(5,5,6); plot(0,0,'r^','markersize',50); axis off
subplot(5,5,11); plot(0,0,'ro','markersize',50); axis off
subplot(5,5,16); plot(0,0,'gp','markersize',50); axis off
subplot(5,5,21); plot(0,0,'m*','markersize',50); axis off