Octave第三天
数据绘制
// An highlighted block
A = [1 2 3]
y1 = sin(2*pi*4*t)
y2 = cos(2*pi*4*t)
plot(t,y1)
hold on
plot(t,y2,'r')
xlabel('time')
ylabel('value')
legend('sin','cos')
title('my plot')
cd 'C:\';print -dpng 'myplot.png'
close
figure(1);plot(t,y1)
subplot(1,2,1)
plot(t,y1)
subplot(1,2,2)
plot(t,y2)
axis([0.5 1 -1 1])
clf
A = magic(5)
imagesc(A)
imagesc(A), colorbar, colormap gray