comparison scripts/ode/private/ode_rk_interpolate.m @ 20598:ea6a1c00763a

fix interpolation bug introduced with 87b557ee8e5d * ode_rk_interpolate.m(hermite_quartic_interpolation): fix typo that lead to incorrect size for interpolated values.
author Carlo de Falco <carlo.defalco@polimi.it>
date Tue, 06 Oct 2015 22:14:41 +0200
parents 87b557ee8e5d
children
comparison
equal deleted inserted replaced
20597:bc6daa38ff50 20598:ea6a1c00763a
85 ## Runge-Kutta Formulas", 1986. 85 ## Runge-Kutta Formulas", 1986.
86 dt = t(2) - t(1); 86 dt = t(2) - t(1);
87 u_half = x(:,1) + (1/2) * dt * (der(:,1:7) * coefs_u_half); 87 u_half = x(:,1) + (1/2) * dt * (der(:,1:7) * coefs_u_half);
88 88
89 ## Rescale time on [0,1] 89 ## Rescale time on [0,1]
90 s = (t_out - t) / dt; 90 s = (t_out - t(1)) / dt;
91 91
92 ## Hermite basis functions 92 ## Hermite basis functions
93 ## H0 = 1 - 11*s.^2 + 18*s.^3 - 8*s.^4; 93 ## H0 = 1 - 11*s.^2 + 18*s.^3 - 8*s.^4;
94 ## H1 = s - 4*s.^2 + 5*s.^3 - 2*s.^4; 94 ## H1 = s - 4*s.^2 + 5*s.^3 - 2*s.^4;
95 ## H2 = 16*s.^2 - 32*s.^3 + 16*s.^4; 95 ## H2 = 16*s.^2 - 32*s.^3 + 16*s.^4;