{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

Homework 8 33

# Homework 8 33 - 33.1*Derivation of the finite differential...

This preview shows page 1. Sign up to view the full content.

This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: 33.1) *Derivation of the finite differential equation can be found on attached page >> format long >> ‐2 ‐ (6.1425*10^(‐4)) ans = ‐2.000614250000000 >> y = ones(7,1) y = 1 1 1 1 1 1 1 >> y = y.*(3.20625*10^(‐4)) y = 1.0e‐003 * 0.320625000000000 0.320625000000000 0.320625000000000 0.320625000000000 0.320625000000000 0.320625000000000 0.320625000000000 >> x = [15 30 45 60 75 90 105]' x = 15 30 45 60 75 90 105 >> x2 = [105 90 75 60 45 30 15]' x2 = 105 90 75 60 45 30 15 >> b = y.*x.*x2 b = 0.504984375000000 0.865687500000000 1.082109375000000 1.154250000000000 1.082109375000000 0.865687500000000 0.504984375000000 >> c = ‐2 ‐ (6.1425*10^(‐4)) c = ‐2.000614250000000 >> A = [c 1 0 0 0 0 0; 1 c 1 0 0 0 0; 0 1 c 1 0 0 0; 0 0 1 c 1 0 0; 0 0 0 1 c 1 0; 0 0 0 0 1 c 1; 0 0 0 0 0 1 c] A = Columns 1 through 4 ‐2.000614250000000 .000000000000000 0 1 0 1.000000000000000 ‐2.000614250000000 1.000000000000000 0 0 1.000000000000000 ‐2.000614250000000 1.000000000000000 0 0 1.000000000000000 ‐2.000614250000000 0 0 0 1.000000000000000 0 0 0 0 0 0 0 0 Columns 5 through 7 0 0 0 0 0 0 0 0 0 1.000000000000000 0 0 ‐2.000614250000000 .000000000000000 0 1 1.000000000000000 ‐2.000614250000000 1.000000000000000 0 1.000000000000000 ‐2.000614250000000 >> y = A\b y = ‐3.017857523701142 ‐5.532584391386217 ‐7.185022149033701 ‐7.759763931536227 ‐7.185022149033699 ‐5.532584391386216 ‐3.017857523701141 Graph of solution compared to myexactbeam.m 33.2) *Derivation of the finite differential equation can be found on attached page h = 0.2500 >> h = h^2 h = 0.0625 >> b = ones(3,1) b = 1 1 1 >> b = b.*2*h b = 0.1250 0.1250 0.1250 >> b1 = [.25 .5 .75]' b1 = 0.2500 0.5000 0.7500 >> b = b.*b1 b = 0.0313 0.0625 0.0938 >> A = [(4 ‐ 2*h) (2 + h^(1/2)) 0 ; (2 ‐ h^(1/2)) ‐(4 ‐ 2*h) (2 + h^(1/2)) ; 0 (2 ‐ h^(1/2)) ‐(4 ‐ 2*h)] A = ‐3.8750 2.2500 0 1.7500 ‐3.8750 2.2500 0 1.7500 ‐3.8750 >> y = A\b y = ‐0.0494 ‐0.0711 ‐0.0563 >> x = 0:.25:1 x = 0 0.2500 0.5000 0.7500 1.0000 >> y = [0 ; y ; 0] y = 0 ‐0.0494 ‐0.0711 ‐0.0563 0 >> plot(x,y,'d') Plot of this solution with spline added ...
View Full Document

{[ snackBarMessage ]}

Ask a homework question - tutors are online