comparison scripts/general/quad2d.m @ 27956:2310164737b3 stable

fix many spelling errors (bug #57613)
author John W. Eaton <jwe@octave.org>
date Fri, 17 Jan 2020 13:15:27 -0600
parents 00f796120a6d
children c20b7290c778
comparison
equal deleted inserted replaced
27950:19878c3adac3 27956:2310164737b3
246 ## where 246 ## where
247 ## g(t) = ((a - b) * cos(t) + (a + b)) / 2 247 ## g(t) = ((a - b) * cos(t) + (a + b)) / 2
248 ## dx = - (a - b) * sin(t) / 2 dt 248 ## dx = - (a - b) * sin(t) / 2 dt
249 ## Now our integral is 249 ## Now our integral is
250 ## \int_a^b \int_0^1 f(x,y) dydx 250 ## \int_a^b \int_0^1 f(x,y) dydx
251 ## as we already subsitute for "y", so 251 ## as we already substitute for "y", so
252 ## gx(tx) = ((a - b) * cos(tx) + (a + b)) / 2 252 ## gx(tx) = ((a - b) * cos(tx) + (a + b)) / 2
253 ## gy(ty) = (1 - cos(ty)) / 2 253 ## gy(ty) = (1 - cos(ty)) / 2
254 ## dydx = (b - a) * sin(tx) * sin(ty) / 4 dtydtx 254 ## dydx = (b - a) * sin(tx) * sin(ty) / 4 dtydtx
255 255
256 xtrans = @(tx) ((xa - xb) .* cos (tx) + (xa + xb)) ./ 2; 256 xtrans = @(tx) ((xa - xb) .* cos (tx) + (xa + xb)) ./ 2;