Question: So everytime i run this code i keep getting different graphs that comes up but the graph that i want to be permanent is this
So everytime i run this code i keep getting different graphs that comes up but the graph that i want to be permanent is this graph. So my request is to please use this code and change it to get the graph that you see in the picture. Also for the lines keep the same lines but could ypu please make the orange line to stop at and you can leave the blue line stop at
Use matlab to fix this code please.
Sample data for Diesel and PetrolcarPosition linspace; Assumed positions of carsCODiesel coscarPositionpi randn; Random data for DieselCOPetrol sincarPositionpi randn; Random data for Petrol Fit polynomial curvespDiesel polyfitcarPosition CODiesel, ;pPetrol polyfitcarPosition COPetrol, ; Generate points for best fit linesfitDiesel polyvalpDiesel carPosition;fitPetrol polyvalpPetrol carPosition; Plotting the datafigure;hold on;scattercarPosition CODiesel, o 'MarkerEdgeColor', ; Diesel datascattercarPosition COPetrol, o 'MarkerEdgeColor', ; Petrol dataplotcarPosition fitDiesel, 'Color', 'LineWidth', ; Diesel best fitplotcarPosition fitPetrol, 'Color', 'LineWidth', ; Petrol best fit Customize the plotxlabelCar Position';ylabelCO Weighted Percentage';titleWeighted CO Emissions';legendDiesel 'Petrol', 'Diesel Best Fit', 'Petrol Best Fit';grid on;hold off;
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
