Question: Complete the function using matlab I had: function x = linSys_1() syms x1 x2 x3 x4 eqn1 = -7.39*x1 + 3.83*x2 + 8.29*x3 + 9.35*x4

 Complete the function using matlab I had: function x = linSys_1()

Complete the function using matlab

I had:

function x = linSys_1() syms x1 x2 x3 x4 eqn1 = -7.39*x1 + 3.83*x2 + 8.29*x3 + 9.35*x4 ==5.52; eqn2 = 3.27*x1 + 1.09*x2 + 6.52*x3 + (-5.59)*x4 == 4.67; eqn3 = 2.18*x1 + 8.55*x2 + (-3.45)*x3 + (-7.46)*x4 == 3.08; eqn4 = 6.79*x1 + (-4.29)*x2 + (-6.97)*x3 + (-4.73)*x4 == -5.33; sol = solve([eqn1 eqn2 eqn3 eqn4],[x1 x2 x3 x4]); x = [sol.x1 sol.x2 sol.x3 sol.x4]; end

However the expected size should be 4x1 instead of 1x4

Requirements: Complete the implementation of the linSys_1 function, which solves a system of simultaneous lincar equations. The function should return a vector x which is the solution of the system of equations below 7.39 x1+3.83 x28.29x9.35 x4-5.52 3.27 + 1.09 x2 + 6.52 x3 +-5.59 x4 = 4.67 2.18 x1 + 8.55 x2 +-3.45 x3 +-7.46 x4 = 3.08 6.79 X1 +-4.29 x2 +-6.97 x3 +-4.73x4=-5.33 nput variable: n/a - This function has no input variables. Create your own variables to represent the system of equations within the function utput variables: x- A vector containing the solution of the system of equations listed above. lint: You can verify your solution by substituting the values of x produced by your function into the original system of equations. Submitted file: function x = linsys_1() end

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!