% test function
clear all
close all
clc
x = linspace(-3, 3, 120);
y2 = zeros(1,120);
for ind = 1:120
    y1(ind)=demfun2(x(ind));
end
plot(x,y1,x,y2)
