{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

hw 4 - Problem 8.3 from matlab EDU> A=[0-7 5 0 4 7-4 3-7...

This preview shows pages 1–5. Sign up to view the full content.

Problem 8.3 from matlab EDU>> A=[0 -7 5; 0 4 7; -4 3 -7]; EDU>> b=[50 -30 40]'; EDU>> x=A\b x = -15.1812 -7.2464 -0.1449 EDU>> x=inv(A)*b x = -15.1812 -7.2464 -0.1449 EDU>> inv(A) ans = -0.1775 -0.1232 -0.2500 -0.1014 0.0725 0 0.0580 0.1014 0 EDU>> A' ans = 0 0 -4 -7 4 3 5 7 -7

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
Problem 8.4(a) matlab EDU>> A=[6 -1;12 8; -5 4] A = 6 -1 12 8 -5 4 EDU>> B=[4 0; .5 2] B = 4.0000 0 0.5000 2.0000 EDU>> C=[2 -2; -3 1] C = 2 -2 -3 1 EDU>> opt1=A*B*C; EDU>> opt2=A*C*B; EDU>> opt3=A*B; EDU>> opt4=A*C; EDU>> opt5=B*C; EDU>> opt6=C*B; -There exist a total of 6 different combinations that would work with these three specific matrixes. As long as the number of columns in the first matrix being multiplied equals the number of rows in the second column being multiplied, matrix multiplication is possible.
Problem 8.6 For this system of linear algebraic equations, there are 6 unknowns and 6 equations (statically determinate). EDU>> A=[-cosd(30) 0 cosd(60) 0 0 0; -sind(30) 0 -sind(60) 0 0 0; cosd(30) 1 0 1 0 0; sind(30) 0 0 0 1 0; 0 -1 -cosd(60) 0 0 0; 0 0 sind(60) 0 0 1] A = -0.8660 0 0.5000 0 0 0 -0.5000 0 -0.8660 0 0 0 0.8660 1.0000 0 1.0000 0 0 0.5000 0 0 0 1.0000 0 0 -1.0000 -0.5000 0 0 0 0 0 0.8660 0 0 1.0000 EDU>> b=[0 1000 0 0 0 0]' b = 0 1000 0 0 0 0 EDU>> A\b ans = -500.0000 433.0127 -866.0254 0 250.0000 750.0000 where=> F1=-500 lb F2= 433.0127 lb F3= -866.0254 lb H2= 0 lb V2= 250lb V3= 750lb

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
function x=GaussNaive(A,b) %Problem 9.6 check %GaussNaive: naive Gauss elimination % x=GaussNaive(A,b): Gauss elimination without pivoting. %input: % A=coefficient matrix % b=right hand side vector %output: % x=solution vector [m,n]=size(A); if m~=n, error( 'matrix A must be squared' ); end nb=n+1; Aug=[A b]; %forward elimination for k=1:n-1 for i=k+1:n factor=Aug(i,k)/Aug(k,k); Aug(i,k:nb)=Aug(i,k:nb)-factor*Aug(k,k:nb); end end %back substitution x=zeros(n,1); x(n)=Aug(n,nb)/Aug(n,n); for i=n-1:-1:1
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}

Page1 / 16

hw 4 - Problem 8.3 from matlab EDU> A=[0-7 5 0 4 7-4 3-7...

This preview shows document pages 1 - 5. Sign up to view the full document.

View Full Document
Ask a homework question - tutors are online