Complete the code to plot the data points.
x = 1:10; y = [2, 4, 6, 8, 10, 12, 14, 16, 18, 20]; [1](x, y); title('Simple Line Plot');
The plot function creates a line plot connecting the data points, which helps reveal patterns in the data.
Complete the code to add grid lines to the plot for better pattern visibility.
x = 1:5; y = [5, 3, 6, 2, 7]; plot(x, y); [1] on;
The grid on command adds grid lines to the plot, making it easier to see patterns and compare values.
Fix the error in the code to correctly display a bar chart.
values = [3, 7, 5, 9]; [1](values); title('Bar Chart');
The bar function creates a bar chart. Using plot or scatter will not produce bars.
Fill both blanks to create a scatter plot with red circle markers.
x = 1:6; y = [2, 5, 3, 7, 4, 6]; scatter(x, y, [1], '[2]');
The first blank sets the marker size (100), and the second blank sets the marker color ('r' for red).
Fill all three blanks to create a histogram with 15 bins and blue face color.
data = randn(100,1); histogram(data, [1], 'FaceColor', [2], 'EdgeColor', [3]);
The number of bins is 15, the face color is blue ('b'), and the edge color is black ('k').