bisec-matlab
TRANSCRIPT
![Page 1: bisec-MATLAB](https://reader036.vdocuments.site/reader036/viewer/2022083010/563db8cc550346aa9a970777/html5/thumbnails/1.jpg)
Ejercicio 1:
clcclearx=0:0.01:2;y1=-x;y2=log(x);plot(x,y1,'r',x,y2,'g')grid on
0 0.2 0.4 0.6 0.8 1 1.2 1.4 1.6 1.8 2-5
-4
-3
-2
-1
0
1
function y=g1(x)y=x+log(x); end
a=0, b=2, tolerancia=10^(-8)
a =
0
![Page 2: bisec-MATLAB](https://reader036.vdocuments.site/reader036/viewer/2022083010/563db8cc550346aa9a970777/html5/thumbnails/2.jpg)
b =
2
tolerancia =
1.0000e-008
>> [c]=bisec('g1',a,b,tolerancia)
Ejercicio 2
clcclearx=0:0.01:5;y1=2*x-7;y2=-3*log(x);plot(x,y1,'m',x,y2,'c')grid on
![Page 3: bisec-MATLAB](https://reader036.vdocuments.site/reader036/viewer/2022083010/563db8cc550346aa9a970777/html5/thumbnails/3.jpg)
0 0.5 1 1.5 2 2.5 3 3.5 4 4.5 5-10
-5
0
5
10
15