Question: (1) A student produced the following script, eqnsolver.m, in response to a programming assignment to create a script that would solve a set oflinear equations


(1) A student produced the following script, eqnsolver.m, in response to a programming assignment to create a script that would solve a set oflinear equations given an augmented coefficient matrix file. 1. script to solve linear set of equations A x b 3. t requires augmented coefficient matrix file header 7. t get augmented coefficient matrix decompose 8. t to coefficient matrix Amat, and right hand side rhs disp fname input ('Augmented coefficient matrix file name augmat load (fname) 12 [Nrow, Nool] size (fname) 13 Amat augmat 1:Nrow) 14. rhs augmat ,Nicol); 15 16 solve system 17 soln Amat/rhs 18. 19. 3 display results disp 20 disp (The solution vector is) disp (soln) However, the following messages appeared when the student attempted to run the script using properly configured augmented coefficient matrix, called test. dat, as a test case. Your job is to (1) find the offending line of code and (2) show a fix to the error in the spaces provided below the message. (a) Error File c:ltempleqnsolver.m Line 5 Column 13 Expected a variable function, or constant, found
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
