Current location - Training Enrollment Network - Mathematics courses - Matlab advanced mathematics experiment
Matlab advanced mathematics experiment
How about linear algebra? Find the general solution of the equation x 1+x2-3x3-x4 = 1, 3x 1-x2-3x3+4x4 = 4, x 1+5x2-9x3-8x4 = 0 solution: a = [/kloc. 3 - 1 -3 4; 1 5 -9 -8]; b =[ 1 4 0]'; b =[A b]; n = 4; R_A= rank (A)R _ B = rank (b) format ratif r _ a = = r _ b&; R _ A = = n X = A \ belseif R _ A = = R _ B& amp; R _ a x = a \ b c = null (a,' r') else x =' Equation has no solver' end result: r _ a = 2 r _ b = 2 Warning: rank loss, rank = 2, tol = 8.8373e-0 15. X = 00-8/153/5c = 3/2-3/43/27/410001so the general solution of the original equations is (figure).