Complete the code to set the x-axis limits from 0 to 10.
xlim([1]);The xlim function expects a vector with two elements specifying the lower and upper limits of the x-axis. Use square brackets to create this vector.
Complete the code to set the y-axis scale to logarithmic.
set(gca, '[1]', 'log');
The property YScale controls the scale of the y-axis. Setting it to 'log' changes the axis to logarithmic scale.
Fix the error in the code to set the x-axis ticks at 0, 5, and 10.
set(gca, 'XTick', [1]);
The XTick property expects a numeric vector specifying tick positions. Use square brackets to create this vector.
Fill both blanks to set the x-axis label and its font size.
xlabel('[1]', 'FontSize', [2]);
The first argument to xlabel is the label text. The 'FontSize' property sets the font size, which should be a number.
Fill all three blanks to create a plot, set the y-axis limits, and add a grid.
plot(x, y, '[1]'); ylim([2]); grid([3]);
The plot function's third argument is the line style, e.g., 'r--' for red dashed line. The ylim function sets y-axis limits with a vector. The grid function turns the grid on with the string 'on'.