What will be the output when the following code is written in MATLAB? [code] u=sin(10);v=pi;whos[/code]

Man Ly

New member
What will be the output when the following code is written in MATLAB?
Code:
 u=sin(10);v=pi;whos
A. u and v are double with 8 bytes
B. u and v are symbolic objects
C. error
D. u and v are double arrays
 
Answer: a
Explanation: ‘sin 10’ and ‘pi’ are numeric values which will be generated as double data type in MATLAB.
Output: Name Size Bytes Class Attributes
u 1x1 8 double
v 1x1 8 double
 

Tìm kiếm

Back
Top