Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function [cc] = calcoef(T, y)
- exec('**/cald.sci', -1)
- n = size(y, 1)
- cc = zeros(n-1, n-1)
- d = zeros(n, 1)
- h = zeros(n-1, 1)
- h2 = zeros(n-1, 1)
- h3 = zeros(n-1, 1)
- l = zeros(n-1, 1)
- d = cald(T, y)
- h = T(2:n) - T(1:n-1)
- h2 = h.*h
- h3 = h.*h.*h
- l = y(2:n) - y(1:n-1)
- cc(:, 1) = y(1:n-1)
- cc(:, 2) = d(1:n-1)
- cc(:, 3) = l./h2 - d(1:n-1)./h
- cc(:, 4) = (d(2:n) - d(1:n-1))./h2 - 2 * l./h3
- endfunction
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement