comparison +sbp/+implementations/d1_noneq_minimal_6.m @ 267:f7ac3cd6eeaa operator_remake

Sparsified all implementation files, removed all matlab warnings, fixed small bugs on minimum grid points.
author Martin Almquist <martin.almquist@it.uu.se>
date Fri, 09 Sep 2016 14:53:41 +0200
parents bfa130b7abf6
children 4cb627c7fb90
comparison
equal deleted inserted replaced
266:bfa130b7abf6 267:f7ac3cd6eeaa
23 x2 = 1.1968523189207e+00; 23 x2 = 1.1968523189207e+00;
24 x3 = 2.1968523189207e+00; 24 x3 = 2.1968523189207e+00;
25 x4 = 3.1968523189207e+00; 25 x4 = 3.1968523189207e+00;
26 x5 = 4.1968523189207e+00; 26 x5 = 4.1968523189207e+00;
27 27
28 xb = zeros(m+1,1); 28 xb = sparse(m+1,1);
29 for i = 0:m 29 for i = 0:m
30 xb(i+1) = eval(['x' num2str(i)]); 30 xb(i+1) = eval(['x' num2str(i)]);
31 end 31 end
32 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 32 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
33 33
38 %%%% Define grid %%%%%%%% 38 %%%% Define grid %%%%%%%%
39 x = h*[xb; linspace(xb(end)+1,L/h-xb(end)-1,N-2*(m+1))'; L/h-flip(xb) ]; 39 x = h*[xb; linspace(xb(end)+1,L/h-xb(end)-1,N-2*(m+1))'; L/h-flip(xb) ];
40 %%%%%%%%%%%%%%%%%%%%%%%%% 40 %%%%%%%%%%%%%%%%%%%%%%%%%
41 41
42 %%%% Norm matrix %%%%%%%% 42 %%%% Norm matrix %%%%%%%%
43 P = zeros(BP,1); 43 P = sparse(BP,1);
44 %#ok<*NASGU> 44 %#ok<*NASGU>
45 P0 = 1.2740260779883e-01; 45 P0 = 1.2740260779883e-01;
46 P1 = 6.1820981002054e-01; 46 P1 = 6.1820981002054e-01;
47 P2 = 9.4308973897679e-01; 47 P2 = 9.4308973897679e-01;
48 P3 = 1.0093019060199e+00; 48 P3 = 1.0093019060199e+00;