Created
September 18, 2013 16:06
-
-
Save shane5ul/6611437 to your computer and use it in GitHub Desktop.
Example of a simple plot in 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
% Generate Data | |
x = linspace(0,1); | |
f1 = x.^2; | |
f2 = x.^3; | |
% plot it | |
h = figure; | |
plot(x,f1, 'r-', 'LineWidth', 4); hold on; | |
plot(x,f2, 'b-', 'LineWidth', 4); hold off; | |
% decorate it | |
legend('f(x) = x^2','f(x) = x^3','Location','NorthWest'); | |
xlabel('x'); | |
ylabel('f(x)') |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment