Anul 3 Semestrul 2

This commit is contained in:
2025-07-03 20:56:38 +03:00
parent 184f3bd92e
commit 3b7fb85767
269 changed files with 20955 additions and 0 deletions
+25
View File
@@ -0,0 +1,25 @@
#f=@(x)((2./sqrt(pi)).*(e.^(-x.^2)));
#for b=0.1:0.1:1
# I = adquad(f,0,b,0.1,4)
# I2 = integral(f,0,b)
#end
f=@(x)(sin(x.^(1/3)));
g=@(x)(sin(x).*3.*(x.^2));
x = [2,4,8,16,32,64,128,256];
trueI = integral(f,0,1)
for n = x
n
I1=homer_int(f,0,1,n)
fprintf('%.*f \n', 10, abs(trueI-I1))
I2=homer_int(g,0,1,n)
fprintf('%.*f \n', 10, abs(trueI-I2))
end