Complete the code to create a matrix of zeros with 3 rows and 4 columns.
A = zeros([1], 4);
The zeros function creates a matrix filled with zeros. The first argument is the number of rows.
Complete the code to calculate the sine of 45 degrees (in radians).
result = sin([1]);MATLAB's sin function expects radians. 45 degrees equals pi/4 radians.
Fix the error in the code to compute the mean of vector v.
average = [1](v);The mean function calculates the average value of elements in a vector.
Fill both blanks to create a vector x with values from 1 to 10 with step 2.
x = [1]:[2]:10;
The colon operator syntax is start:step:end. Here, start is 1 and step is 2.
Fill all three blanks to create a structure with fields 'name', 'age', and 'score'.
student.[1] = 'Alice'; student.[2] = 20; student.[3] = 95;
Structures use dot notation to assign values to fields. The fields are 'name', 'age', and 'score'.