Complete the code to assign the value 10 to the variable x.
x = [1];In MATLAB, to assign a numeric value to a variable, just write the number without quotes.
Complete the code to assign the string 'hello' to the variable greeting.
greeting = [1];In MATLAB, strings are enclosed in single quotes.
Fix the error in the code to assign the value 5 to variable num.
num = [1];In MATLAB, each statement must end with a semicolon to suppress output.
Fill both blanks to create a variable 'result' that stores the sum of 3 and 7.
result = [1] [2] 7;
To add 3 and 7, use the plus sign (+) between them.
Fill all three blanks to create a variable 'area' that stores the product of length and width.
area = [1] [2] [3];
To calculate area, multiply length by width using the * operator.
