In: Computer Science
Create a MATLAB script file to determine the given function is continuous or discontinuous at given interval (points).
`Hey,
Note: If you have any queries related to the answer please do comment. I would be very happy to resolve all your queries.
clc
clear all
close all
format long g
f=@(x) tan(x);
%interval is taken as -1 to 1
x=-5:0.0001:5;
h=1e-10;
for i=1:length(x)
if(~(abs(f(x(i))-f(x(i)+h))<1e-4&abs(f(x(i))==f(x(i)-h))<1e-4))
disp(['Function is discontinuous at x=' num2str(x(i))]);
return;
end
end
disp('It is continuous function')
Kindly revert for any queries
Thanks.