What will be the output of the following code? [code]ilaplace(1/syms p^2)[/code]

Thanh Hoan

New member
What will be the output of the following code?
Code:
ilaplace(1/syms p^2)
A. t
B. s
C. error
D. ilaplace is not present in MATLAB
 
Answer: c
Explanation: We need to declare p as a symbolic variable before passing it to the ilaplace command. But here, MATLAB won’t show that p is not defined. It will show ‘Unexpected MATLAB expression’ since the command ilaplace is defined to accept variables already defined. It won’t allow defining a variable in the function parameter itself.
 

Tìm kiếm

Back
Top