% my_plot.m % Purpose of my_plot.m: This script plots the sin, cosine, tan and % exponential function on [0, 2*pi] for 100 points. % The output is saved in the eps file my_plot.eps % Author : Unknown, 11th February 2015. % Variable List : % x = Points in the domain. % y = Values of the function plotted. clear all ; % clear the workspace. clc ; % clear the command window. N = 100; % Number of points. x = linspace(0, 2*pi , N); plot(x, sin(x), '-cd') ; hold on ; plot(x, tan(x), '-*r') ; plot(x, exp(x), '-k') ; xlabel('Domain points'); ylabel('Function curves'); title('Comparing the plot of known functions '); legend('sin','tan','exp','Location', 'NorthWestOutside'); print('-depsc',['my_plot','.eps']); % more code