Multiple choice general knowledge

To solve a set of eqns 2x+3y=5;3x+15y=8, the correct Matlab input is

  1. [2 3 ; 3 15] / [5 ; 8]

  2. [2 3 ; 3 15] \ [5 ; 8]

  3. [2 3;3 15] / [5 8]

  4. [2 3;3 15] \ [5 8]

Reveal answer Fill a bubble to check yourself
B Correct answer
Explanation

To solve Ax=b in MATLAB, use the backslash operator: A \ b. This represents [2 3; 3 15] \ [5; 8]. Forward slash (/) would solve xA=b, which is wrong here. Options C and D use row vectors [5 8] instead of column vectors [5; 8].