please help me to solve it

1 vue (au cours des 30 derniers jours)
Abdulrasheed
Abdulrasheed le 22 Oct 2014
Modifié(e) : Abdulrasheed le 22 Oct 2014
Exercise 1 . Use the function modified from Table 8.5-2, Page 355 listed below to solve the problems listed for Problem 17 plus the additional problem A = [ 3 -4; 6 -8]; b=[ 5; 2]; Part b. Draw the modified flow chart for this code reflecting the changes made to the program in the book. A copy of the book figure is posted. function [ x ] = lineq( A, b ) % Modified Function from Palm, 8.5-2, computes linear equation solution % with checks for valid solutions sizeA = size(A); if rank(A) == rank([A b]) % The ranks are equil. if rank(A) == sizeA(2) % number of independent equations = # of variables disp(' Unique solution'); x = A\b; display(x); else % rank of A less than the number of unknowns disp(' Infinite number of solutions'); rr = rref( [ A b ]); fprintf(' Reduced Row Echelon Form =\n'); disp(rr); disp(' Psuedo inverse result'); x = pinv(A)*b; fprintf(' x =\n'); disp(x); end else if( rank([ A b ]) > sizeA(2) ) % Too much information disp(' Least Squares Solution') x = A\b; fprintf(' x =\n'); disp(x); else % 0*x = b - a solution is infinite disp(' Psuedo inverse result'); x = pinv(A)*b; fprintf(' x =\n'); disp(x); end end % check the result,this should be close to zero. fprintf(' A x - b =\n'); disp( A*x-b ); end
Exercise 2: In the space below, write the Matlab code you would need to graphically find the solution to the set of equations given below, using a PLOT command. -2x + y = -5 (1) 2x + y = 5 (2)
Exercise 3: Three cables are used to tether a balloon as shown. Determine the vertical force P exerted by the balloon at A knowing that the tension in cable AD is 481 N. Use a matrix linear equation solution method

Réponses (0)

Catégories

En savoir plus sur Matrix Indexing dans Help Center et File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by