-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMAIN.asv
34 lines (33 loc) · 864 Bytes
/
MAIN.asv
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
%№1------------------------------------
%f =@(x) x^2 * x^(-3*x + 1);
%a = 0;
%b = 3;
n = [3,4,5,6,8,10,15];
%Uniform
%------------------------------------
%for k = 1:length(n)
% [x,u] = uniform_grid(f,a,b,n(k));
% [x1,u1] = Lag_3n(f,x,u,n(k));
%------------------------------------
%plot(x,u,'g',x1,u1,'b--o');
% title({'Lagrange, uniform'; n(k)});
%hold off
%pause
%end
%------------------------------------
%Chebyshev
%------------------------------------
%№2------------------------------------
f =@(x) asin((sin(x)+sin(3*x)+sin(5*x))/4);
a = 0;
b = pi;
%------------------------------------
%for k = 1:length(n)
%[x,u] = uniform_grid(f,a,b,n(k));
%[x1,u1,err] = PN_3n(f,x,u,n(k));
%------------------------------------
%plot(x,u,'g',x1,u1,'b--o');
%title({'Newtone, uniform'; n(k); err});
%hold off
%pause
%end