adplus-dvertising
frame-decoration

Question

What will be the output of the following code?
close all;
for x = 1.5 : .5 : 2;
y=3; 
x=y+3
 clc
end

a.

No value will be stored

b.

The result will be printed

c.

The result will be printed twice but no value will remain in the Workspace

d.

The loop will not run

Posted under MATLAB

Answer: (c).The result will be printed twice but no value will remain in the Workspace

Engage with the Community - Add Your Comment

Confused About the Answer? Ask for Details Here.

Know the Explanation? Add it Here.

Q. What will be the output of the following code?

Similar Questions

Discover Related MCQs

Q. Clear will removes all graphs.

Q. How can we close all graphs in MATLAB?

Q. clc in a function will clear the function.

Q. ___________ will give a hint that the file is closed.

Q. To delete one variable but not the entire workspace, we need to mention the variable name after the clear command.

Q. What is the nature of storage of anything in MATLAB?

Q. What is the starting index of an array in MATLAB?

Q. All data types are converted to ____ before mathematical operations.

Q. What is the return type of angles in MATLAB?

Q. To represent only two digits after the decimal point, the format we use is ______

Q. How do we change the nature of the display of the numerical answer?

Q. Strings are stored in ____ variables.

Q. What are the minimum numbers of expressions which will be required to express a mathematical relation?

Q. The teacher has given the assignment to find the sum of 2 numbers. But the code should not contain the ‘+’ operator. What is to be done?

Q. A mathematical statement is a combination of functions and variables only.

Q. What is the command which can be used to see the expressions within a user-defined function in MATLAB?

Q. What are mathematical expressions?

Q. Which command is used to find the argument of a complex number?

Q. What is the class of the complex number?

Q. What is the argument of -1-i in MATLAB?