Last active
October 15, 2015 13:03
-
-
Save joyhuang9473/354d98be80095a79de28 to your computer and use it in GitHub Desktop.
plot demo with Octave
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
% plot demo | |
t=[0:0.01:0.98]; | |
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'); | |
print -dpng 'myPlot.png'; | |
clf; | |
close; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment