1.

The correct way of using the quad command while integrating an inline non-linear function is ___________(a) quad(‘[]’)(b) quad([‘’])(c) quad([])(d) quad(‘’)I had been asked this question in an online interview.Question is from Integration topic in portion Beyond the Basics of MATLAB

Answer»

Right answer is (a) QUAD(‘[]’)

Explanation: The inline function, being a non-linear function and saved as an inline class, will be given as a string argument to the quad() command. Due to its non-linear nature, it has to be PLACED like a MATRIX. quad(‘’) will only take the function but the function is non-linear so it will show an ERROR. quad([‘’]) is wrong because the ‘’ should COMPRISE the entire function, hence it should be outside []. quad([]) is syntactically wrong.



Discussion

No Comment Found

Related InterviewSolutions