Question: for the y axis could you make it go up by 0 , 1 0 , 2 0 , 3 0 , 4 0 ,

for the y axis could you make it go up by 0,10,20,30,40,50, and could you make the blue and orange circles a bit more spread out around the graph. When i use this code i keep getting the graph that you see in the picture , everything is fine i just nees the y axis to go up by 10s starting at 0 and ending at 50. And i need the blue and orange circles to be more spread out. Just fix those two things do not change anything else.
Here is the code to use on matlab :
% Set a fixed seed for reproducibilityseed =50; % Choose any integer value for the seedrng(seed); % Set the random number generator seed% Sample data for Diesel and Petrol carscarPosition = linspace(1,60,50);% Assumed CO2 emissions for Diesel and PetrolCO2Diesel =20+2* exp(-carPosition /60*2* pi)- randn(1,50)*2;CO2Petrol =18+2*(carPosition /60*2* pi).^0.3+ randn(1,50)*2;% Fit polynomial curves with a reduced degree of 2pDiesel = polyfit(carPosition, CO2Diesel, 2);pPetrol = polyfit(carPosition, CO2Petrol, 2);% Generate points for best fit linesfitDiesel = polyval(pDiesel, carPosition(carPosition50));fitPetrol = polyval(pPetrol, carPosition);% Plotting the datafigure;hold on;% Plot Diesel best fit lineplot(carPosition(carPosition50), fitDiesel, 'Color', [1,0.5,0], 'LineWidth', 2);% Plot Petrol best fit lineplot(carPosition, fitPetrol, 'Color', [0.5,0,0.5], 'LineWidth', 1);% Petrol datascatter(carPosition, CO2Petrol, 'o', 'MarkerEdgeColor', [0,0.5,1]); % Blue for Petrol% Diesel datascatter(carPosition, CO2Diesel, 'o', 'MarkerEdgeColor', [1,0.5,0]); % Orange for Diesel% Customize the plotxlabel('Car Position');ylabel('CO2 Weighted Percentage');title('Weighted CO2 Emissions');xlim([160]);ylim([050]);% Add a legend with custom nameslegend('Diesel Best Fit', 'Petrol Best Fit', 'Petrol', 'Diesel');% Add grid linesgrid on;hold off;
 for the y axis could you make it go up by

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!