What is the output of the following code? [code]clipboard(copy,’poe’)[/code]

What is the output of the following code?
Code:
clipboard(copy,’poe’)
A. Error
B. Copies poe
C. Copies poe to the MATLAB file
D. Copies poe to the MATLAB function
 
Answer: a
Explanation: ‘copy’ is a parameter passed to the function clipboard. It is a string so it should be enclosed within ‘’. But here, copy has been passed to the function without any enclosement which will characterize it as a string. Hence, this leads to an error.
 

Tìm kiếm

Back
Top