%% mlNl011R.m  Funktion nollakohdat
close all
clear
format

f=@(x)(x-1).*sin(12*x./(x.^2+0.4*x+.1))
x=linspace(-4,4,1000);
plot(x,f(x)); grid on;shg
%%
x=linspace(-4,-2,1000);
plot(x,f(x)); grid on;shg
N=1
%%
figure
x=linspace(-2,-1,1000);
plot(x,f(x)); grid on;shg
N=N+3
%%
figure
x=linspace(-1,-0.3,1000);
plot(x,f(x)); grid on;shg
N=N+11
%%
figure
x=linspace(-.3,.1,1000);
plot(x,f(x)); grid on;shg
N=N+19
%%
x=linspace(.1,4,1000);
plot(x,f(x)); grid on;shg
N=N+5
disp(['Nollakohtien lkm = ',num2str(N)])
%%
x=linspace(-.2,-.1,1000);
plot(x,f(x)); grid on;shg
%% Pienin nollakohta valilla [-0.2,-0.1]
fzero(f,-0.19)
%%

