% test function
clear all
close all
clc
x = linspace(-2*pi, 2*pi, 120);
y1 = x.*x - 1./x;
y2 = 10*cos(x);
plot(x,y1,x,y2)
Title ('x^2 - 1/x and 10*cos(x)')
Xlabel('X')
Ylabel ('f1(x), f2(x)')
figure;
y3 = y1 - y2;
y4 = 0*y3;
plot (x,y3, x,y4)
Title ('x^2 - 1/x - 10*cos(x)')
Xlabel('X')
Ylabel ('f(x)')
