Skip to content

Instantly share code, notes, and snippets.

@adamjgnoel
Created April 28, 2016 06:01
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save adamjgnoel/ec6f6657d346740c82ac6cd19d58fc0c to your computer and use it in GitHub Desktop.
Save adamjgnoel/ec6f6657d346740c82ac6cd19d58fc0c to your computer and use it in GitHub Desktop.
% Plotting take 2
x = 1e-2:1e-2:100;
% Smooth curves
y1 = exp(-x);
y2 = 1-exp(-x);
% Noisy curves
n = length(x);
z1 = y1.*(1+0.005*randn(1,n));
z2 = y2.*(1+0.005*randn(1,n));
hFig = figure;
hAxes = axes('Parent',hFig,...
'FontSize',12,'XGrid','on', 'YGrid','on', 'Box', 'on');
hold('on');
plot(hAxes, x,y1, 'Color', [0 0 0]);
plot(hAxes, x,y2, 'Color', [0 0 1]);
plot(hAxes, x,z1, 'Color', [0 0.6 0]);
plot(hAxes, x,z2, 'Color', [1 0 0]);
xlabel('Time [s]');
ylabel('Exponential Observation');
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment