1.

How will we integrate a non-linear function, f, taken as an inline function?(a) int([f])(b) quad(‘f’)(c) quad([f])(d) quad(‘[f]’)This question was addressed to me by my college director while I was bunking the class.This key question is from Integration topic in portion Beyond the Basics of MATLAB

Answer»

Correct answer is (d) quad(‘[F]’)

The explanation: The function, f, will be taken as a string input. Hence, we cannot use the int COMMAND since it takes SYMBOLIC arguments while the CLASS of our function is inline. Since the function is non-linear, we need to introduce it as a matrix to our quad() command. It takes string arguments so the correct answer should be quad(‘[]’).



Discussion

No Comment Found

Related InterviewSolutions