FILE
向我展示了 h=[0.01 0.05 0.1 0.5];
func = @(t, y) -2*y+t*sin(t);
opts = odeset('Reltol',1e-13,'AbsTol',1e-14,'Stats','on');
f1_f2_matrix = [];
sinus=@(t) t*(sin(t));
error2nd = zeros(length(h),1);
errorInf = zeros(length(h),1);
error2ndEuler = zeros(length(h),1);
errorInfEuler = zeros(length(h),1);
for i=1:length(h)
t=0:h(i):10;
euler = zeros(length(t),1);
fun_builtin = zeros(length(t),1);
t_builtin = zeros(length(t),1);
results = zeros(length(t),1);
%matrix for A=-2 and given h=0.01
matrix=[ 1-1/2*h, (1/2-sqrt(3)/3)*h;
(1/2+sqrt(3)/3)*h, 1-1/2*h];
for n=2:length(t)
B = [-2*results(n-1) + sinus(t(n-1)+(1/2-sqrt(3)/6)*h);
-2*results(n-1) + sinus(t(n-1) + (1/2+sqrt(3)/6)*h)];
%system of equations solution
f1_f2_matrix = matrix\B;
results(n) = (results(n-1) + h*1/2*(f1_f2_matrix(1) + f1_f2_matrix(2)));
%euler
euler(n) = euler(n-1)+h(i)*func(t(n-1),euler(n-1));
end
%ODE45 FUNCTION
[t_builtin,fun_builtin] = ode45(func, t, 0, opts);
%y'=-2y+tsin(t) errors
error2nd(i)=norm(fun_builtin-results)/norm(fun_builtin); %root mean square error of my function
errorInf(i)=norm((fun_builtin-results), Inf)/ norm((fun_builtin), Inf); %maximum error of my function
error2ndEuler(i)=norm(euler-results)/norm(fun_builtin); %root mean square error of my function (euler)
errorInfEuler(i)=norm((euler-results), Inf)/ norm((fun_builtin), Inf); %maximum error of my function (euler)
end
figure semilogy(h, error2nd, h, errorInf,h, error2ndEuler, h, errorInfEuler)
title([{('Dependence of root mean square and maximum errors')}; {('from h-step and method of solving differential equation')}])
legend('root mean square error: Gauss-Legendre of 4th order','maximum error: Gauss-Legendre of 4th order method','root mean square error: Euler method', 'maximum error: Euler method', 'Location', 'southeast');
xlabel('step');
ylabel('error');
的所有提交,但如果我只想查看更改文件内容而非元数据(权限等)的提交,该怎么办?有没有办法做到这一点?
答案 0 :(得分:1)
不是,不。您可以在某处保存找到的提交哈希值(或整个org.apache.spark.sql.Column
输出)并进一步过滤它们,但这些内容未构建到Git中。