0001
0002
0003
0004
0005
0006
0007 clearvars
0008 close all
0009
0010
0011
0012
0013
0014 addpath(genpath('../../General-Functions'))
0015 addpath('Functions')
0016 addpath('Data')
0017 plot_init;
0018
0019 disp('--- analyse theoretical precision ---')
0020
0021 init_rand = 6;
0022 type_robust = 0
0023
0024
0025
0026
0027
0028 out_C = 1;
0029 out_print = 0;
0030 Tol =0.15;
0031
0032 print_type = 0;
0033 plot_type = 0;
0034
0035 init_rand_seed(init_rand);
0036
0037
0038 sigma_z=zeros(10,1);
0039 n=4
0040 d_max=10;
0041 for d=1:d_max
0042 [points,BB,delta_x,sigma_k,sigma_s,out_in,dem]=simulate_points_dem_15_flat(d,n);
0043
0044 Np = size(points,1);
0045
0046
0047
0048
0049 type_robust=0;
0050
0051 starttime = cputime
0052 [ds,S,Sigma,Np,Nr,Mc,ver,A,w,w_f,W] =...
0053 smooth_dem_robust_bilinear...
0054 (points,BB,delta_x,sigma_k,out_C,type_robust,out_in,...
0055 print_type,plot_type);
0056 complete_time_for_solution=cputime-starttime
0057
0058 figure
0059 hold on
0060 mesh(S);
0061 title(strcat('Height = \sigma_z, d=',num2str(2*d)))
0062 view([-33,63])
0063 sigma_centre=sqrt(S(2+(n-1)*d,2+(n-1)*d));
0064 sigma_z(d)=sigma_centre;
0065 end
0066
0067 std_z=sigma_z'
0068
0069 figure
0070 hold on
0071 d_range=1:d_max;
0072 plot(2*(1:d_max),sigma_z(1:d_max),'ob','MarkerSize',12)
0073 B=regress(sigma_z(d_range).^2,[ones(length(d_range),1),(2*d_range)'.^2])
0074 plot(2*(1:d_max),sqrt(B(1)+B(2)*(2*(1:d_max))'.^2),'-r','LineWidth',2)
0075 title(strcat('\sigma_z =',num2str(B(1)),' + ',num2str(B(2)),'d, (d > 1)'))