1.

What is the syntax to solve simultaneous equations easily?(a) solve[“equation-1”,”equation-2”];(b) sol[“equation-1” “equation-2”];(c) sol[‘equation-1’‘equation-2’];(d) solve[‘equation-1’,‘equation-2’];The question was posed to me in a national level competition.Query is from Solving Equations in chapter MATLAB Basics of MATLAB

Answer»

The correct option is (d) solve[‘equation-1’,‘equation-2’];

The explanation is: To solve equations simultaneously, we NEED to place the equations within the pre-defined MATLAB function ‘solve’ as string arguments within a pair of single INVERTED commas and separated by a COMMA. The function sol can also be used but the syntax within the third bracket is same. So, solve[‘equation-1’,‘equation-2’]; is correct.



Discussion

No Comment Found

Related InterviewSolutions