final exam (1)
.docx
keyboard_arrow_up
School
St. John's University *
*We aren’t endorsed by this school
Course
3114
Subject
Mechanical Engineering
Date
Dec 6, 2023
Type
docx
Pages
2
Uploaded by GeneralMandrillPerson723
Mechatronics
Spring 2020 Final Exam
Question 1: (20 points)
Write code using codeblocks to do the following:
Ask the user for and store three integers between 0 and 255 inclusive. Output the ASCII
character representation for each in a formatted sentence example:
The first number 65 represents the character A.
Output the three values in binary example:
The first number 65 is represented in binary as 01000001.
The program should work for any inputs in the specified range.
Comment every line in your program using // and submit the commented code
Question 2: (20 points)
Write a program, using codeblock, as follows.
-The program asks the user for the unit type of temperature input: C for Celsius, F for
Fahrenheit, or K for Kelvin. (both upper and lower case should work)
- The user then is prompted to enter the temperature that should be stored in a float type
variable.
- The program then outputs the temperature for all three scales for any input type. Example : if
the input temperature is Fahrenheit then the program outputs the corresponding temperature
in Celsius, Fahrenheit, and Kelvin.
- Ask the user if any other conversions are needed, if y for yes, keep repeating the whole
process, and if n for no then end the program.
K = C + 273.15
C = K – 273.15
F = C * (9/5) + 32
C = (F – 32) * 5/9
Output with precision of 2.
Comment every line in your program using // and submit the commented code
Question 3: (30 points)
Deign a system that controls heating and cooling of a temperature-controlled room using a
TMP36 temperature sensor, two LEDs, and two relays.
Relay one turns the cooling system on and relay two turns the heating system on. The room
temperature should be kept between 18 degrees Celsius and 22 degrees Celsius. If the
temperature sensor registers a temperature lower than 18 then the heating circuit is turned on,
the red LED comes on, and stays on till the temperature reaches 20, then both are turned off. If
the temperature sensor registers a temperature higher than 22 then the cooling circuit is turned
on, the green LED comes on, and stays on till the temperature reaches 20, then both are turned
off.
Assume power input to heating and cooling to be 120 v.
Submit the circuit design neat and well labeled. Submit the code, well documented.
Question 4: (30 points)
Design a system that controls the opening and closing of an access gate for a parking lot. The
gate has two ultrasound sensors and a stepper motor.
Ultrasound one detects the approaching car so if it reads a distance less than one meter then a
car is waiting to enter. If a car is waiting to enter then the stepper motor will open the gate by
running clockwise for 6.5 turns (use the number of steps per turn from the stepper lab). The
program should wait for 20 seconds after the gate is open and then check if the second
ultrasound has an object that is closer than one meter, if yes then wait another 20 second and
check, until ultrasound two is clear then lower the gate by running the stepper motor counter
clockwise 6.5 turns. (hint: you can use millis())
Do not use stepper.h
Submit the circuit design neat and well labeled. Submit the code, well documented.
Your preview ends here
Eager to read complete document? Join bartleby learn and gain access to the full version
- Access to all documents
- Unlimited textbook solutions
- 24/7 expert homework help
Related Questions
Important instruction: These questions use the last three-digit value (L3D) of individual student matrix numbers. For example, if the matrix number is CD180264 then the L3D value is 264 (since the last three digits is 264). Some data require multiplication of the L3D value, for example, 10(L3D) means 10 x L3D
subject name is INDUSTRIAL ENGINEERING
arrow_forward
Matlab Code
arrow_forward
I need help with the purple line the line that you see one the graph on the picture needs to be on the graph.
Use this code to add the purple line and make sure it’s crossing the orange line. Please make sure the lines are positioned the same way it is shown on the picture with the graph.
Use this code on MATLAB and add the purple line.
% Sample data for Diesel and Petrol cars
carPosition = linspace(1, 60, 50); % Assumed positions of cars
% Use the 'seed' function instead of 'rng'
seed = 50; % Define your seed here
rand('seed',seed);
% Assumed CO2 emissions for Diesel and Petrol
CO2Diesel = 25 + 5*cos(carPosition/60*2*pi) + randn(1, 50)*5; % Random data for Diesel
CO2Petrol = 20 + 5*sin(carPosition/60*2*pi) + randn(1, 50)*5; % Random data for Petrol
% Fit polynomial curves with a reduced degree of 2
pDiesel = polyfit(carPosition, CO2Diesel, 2);
pPetrol = polyfit(carPosition, CO2Petrol, 2);
% Generate points for best fit lines
fitDiesel = polyval(pDiesel, carPosition);…
arrow_forward
Hi I need help to make the line change into a different color, I half of the line to be orange and I need the other half of the line towards the end to be purple as shown in the picture. Also I need there be a box saying Diesel, petrol, diesel best fit, petrol best fit. This part is also shown in the graph.
Please use this code and fix it in MATLAB:
% Sample data for Diesel and Petrol cars
carPosition = linspace(1, 60, 50); % Assumed positions of cars
% Fix the random seed for reproducibility
rng(50);
% Assumed positions of cars
CO2Diesel = 25 + 5*cos(carPosition/60*2*pi) + randn(1, 50)*5; % Random data for Diesel
CO2Petrol = 20 + 5*sin(carPosition/60*2*pi) + randn(1, 50)*5; % Random data for Petrol
% Fit polynomial curves
pDiesel = polyfit(carPosition, CO2Diesel, 3);
pPetrol = polyfit(carPosition, CO2Petrol, 3);
% Generate points for best fit lines
fitDiesel = polyval(pDiesel, carPosition);
fitPetrol = polyval(pPetrol, carPosition);
% Combine the best fit lines
combinedFit =…
arrow_forward
Important instruction: This question uses the last three-digit value (L3D) of individual student matrix number. For example, if the matrix number is CD180264 then the L3D value is 264 (since the last three digits is 264). Some data require multiplication of the L3D value, for examAdditional instruction: These questions use the last three-digit value (L3D) of individual student matrix number. Example, if the matrix number is CD180264 then the L3D value is 264 (since the last three digits is 264). Some data require multiplication of the L3D value, for example 10(L3D) means 10 x L3D.ple 10(L3D) means 10 x L3D.
subject name is
arrow_forward
Q4: Create a Visual Basic Project to find the value of the following series:
h? h4 h3
cos(h) = h –
2!
3!
4!
Write the code program so that the value of angle (h) is entered into inputbox.
Estimate the value of series (cos(h)) so that the absolute value of any term is
greater or equal to 10-6. Display the required number of terms (N) which it used in
this series in a text box and display the result of series (cos(h)) in another separate
text box.
arrow_forward
The Pascal triangle can be displayed as elements in a lower-triangular matrix as shown on the right. Write a MATLAB program that creates a n × n matrix that displays n rows of Pascal’s triangle. Use the program to create 4 and 7 rows Pascal’s triangles. (One way to calculate the value of the elements in the lower portion of the matrix is
arrow_forward
Q1: write a program to enter any text and compute its length.
Q2: Design a form with a text box. Use select statement so
that when user enters g, b, r and y then form colored to
green, blue, red, and yellow respectively.
Q3: Write a program to print multipliers of 5 (from 5 to 50)
arrow_forward
Please draw 5 and 6
arrow_forward
Create an illustration or diagram of the amusement park ride called THE BUMPER CAR RIDE, then proceed to add labels based on the guidelines provided within the image.
The screenshot is the example of the diagram BUT THAT IS A DIAGRAM OF THE GRAVITRON RIDE. I need an illustration DIAGRAM OF THE BUMPER CAR RIDE, do not answer using AI.
arrow_forward
I’m using this code in MATLAB but for some odd reason every time I run it on MATLAB I keep on getting a different graphs. In the picture that shows two different graphs are from the same code, but I need to it to look like the picture that has one graph. Could you please fix it. To make it look like the picture that has one graph?
Here is the code:
% Sample data for Diesel and Petrol
carPosition = linspace(1, 60, 50); % Assumed positions of cars
CO2Diesel = 25 + 5*cos(carPosition/60*2*pi) + randn(1, 50)*5; % Random data for Diesel
CO2Petrol = 20 + 5*sin(carPosition/60*2*pi) + randn(1, 50)*5; % Random data for Petrol
% Fit polynomial curves
pDiesel = polyfit(carPosition, CO2Diesel, 3);
pPetrol = polyfit(carPosition, CO2Petrol, 3);
% Generate points for best fit lines
fitDiesel = polyval(pDiesel, carPosition);
fitPetrol = polyval(pPetrol, carPosition);
% Plotting the data
figure;
hold on;
scatter(carPosition, CO2Diesel, 'o', 'MarkerEdgeColor', [1 0.5 0]); % Diesel data…
arrow_forward
The picture that has two graphs are generated by this code. Every time I run it on MATLAB it keeps generating graphs with different curves. The picture that shows one graph is the curve that I want to keep. Please keep the color of the lines and the circles and keep the title of the graph the same. I want everything to be the same except I want the line to look exactly like the picture with one graph on it.
Use this code on MATLAB and fix it and then send the correct code back please.
% Sample data for Diesel and Petrol cars
carPosition = linspace(1, 60, 50); % Assumed positions of cars
% Use the 'seed' function instead of 'rng'
seed = 50; % Define your seed here
rand('seed',seed);
% Assumed CO2 emissions for Diesel and Petrol
CO2Diesel = 25 + 5*cos(carPosition/60*2*pi) + randn(1, 50)*5; % Random data for Diesel
CO2Petrol = 20 + 5*sin(carPosition/60*2*pi) + randn(1, 50)*5; % Random data for Petrol
% Fit polynomial curves with a reduced degree of 2
pDiesel = polyfit(carPosition,…
arrow_forward
Could you please fix my code it’s supposed to look like the graph that’s on the picture. But the lines do not cross eachother at the beginning. Could you make the lines look like the lines on the graph?
Use this code in MATLAB and fix it.
% Sample data for Diesel and Petrol cars
carPosition = linspace(1, 60, 50); % Assumed positions of cars
% Define your seed here
seed = 50;
rand('seed',seed); % Set the seed for reproducibility
% Assumed CO2 emissions for Diesel and Petrol
CO2Diesel = 25 + 5*cos(carPosition/60*2*pi) + randn(1, 50)*5; % Random data for Diesel
CO2Petrol = 20 + 5*sin(carPosition/60*2*pi) + randn(1, 50)*5; % Random data for Petrol
% Fit polynomial curves with a reduced degree of 2
pDiesel = polyfit(carPosition, CO2Diesel, 2);
pPetrol = polyfit(carPosition, CO2Petrol, 2);
% Generate points for best fit lines
fitDiesel = polyval(pDiesel, carPosition);
fitPetrol = polyval(pPetrol, carPosition);
% Plotting the data
figure;
hold on;
% Plot Diesel best fit line…
arrow_forward
There is a small space between the orange and purple line could you please connect the two lines together also can you please make the purple line shorter and then connect the purple line to the orange line, please take out the box that says “Diesel, petrol, Diesel best fit, petrol best fit”. Also when ever I run this code the graph shows up but there are still errors that comes up could you please fix them when you are running this on MATLAB.
Please use this code on MATLAB and fix it.
% Sample data for Diesel and Petrol cars
carPosition = linspace(1, 60, 50); % Assumed positions of cars
% Fix the random seed for reproducibility
rng(50);
% Assumed CO2 emissions for Diesel and Petrol
CO2Diesel = 25 + 5*cos(carPosition/60*2*pi) + randn(1, 50)*5; % Random data for Diesel
CO2Petrol = 20 + 5*sin(carPosition/60*2*pi) + randn(1, 50)*5; % Random data for Petrol
% Fit polynomial curves
pDiesel = polyfit(carPosition, CO2Diesel, 3);
pPetrol = polyfit(carPosition, CO2Petrol, 3);
% Generate…
arrow_forward
I’m making the graph that you see in the picture but the code that I’m using makes the line with to many curves. Could you make the lines look like the one that you see on the graph. Don’t change the color just make it with a little bit less curves like you see in the picture.
Use this code on MATLAB and fix it.
% Sample data for Diesel and Petrol cars
carPosition = linspace(1, 60, 50); % Assumed positions of cars
% Fix the random seed for reproducibility
rng(50);
% Assumed CO2 emissions for Diesel and Petrol
CO2Diesel = 25 + 5*cos(carPosition/60*2*pi) + randn(1, 50)*5; % Random data for Diesel
CO2Petrol = 20 + 5*sin(carPosition/60*2*pi) + randn(1, 50)*5; % Random data for Petrol
% Fit polynomial curves
pDiesel = polyfit(carPosition, CO2Diesel, 3);
pPetrol = polyfit(carPosition, CO2Petrol, 3);
% Generate points for best fit lines
fitDiesel = polyval(pDiesel, carPosition);
fitPetrol = polyval(pPetrol, carPosition);
% Combined best fit
combinedFit = (fitDiesel + fitPetrol) / 2;…
arrow_forward
Hello I’m trying to make the graph that you see in the picture, I’m trying the exact copy of that graph using this code but I’m having a hard time doing that. Could you change the code so that it looks like the graph that you see on the picture using MATLAB, please send the code when you are finished.
% Sample data for Diesel and Petrol cars
carPosition = linspace(1, 60, 50); % Assumed positions of cars
% Fix the random seed for reproducibility
rng(45);
% Assumed positions of cars
CO2Diesel = 25 + 5*cos(carPosition/60*2*pi) + randn(1, 50)*5; % Random data for Diesel
CO2Petrol = 20 + 5*sin(carPosition/60*2*pi) + randn(1, 50)*5; % Random data for Petrol
% Fit polynomial curves
pDiesel = polyfit(carPosition, CO2Diesel, 3);
pPetrol = polyfit(carPosition, CO2Petrol, 3);
% Generate points for best fit lines
fitDiesel = polyval(pDiesel, carPosition);
fitPetrol = polyval(pPetrol, carPosition);
% Plotting the data
figure; hold on;
scatter(carPosition, CO2Diesel, 'o', 'MarkerEdgeColor', [1 0.5…
arrow_forward
I need help with simulink. It is my first time using simulink. I am trying to make a simulink program turning on the LED on the board for 10sec for an Arduino Mega 2560. I have attached an image of what I tried to do. After I run, it just says no diagnostic. How do I know if I did this correctly or not?
arrow_forward
4:16
Search
Expert Q&A
Done
Please solve question 16-109 below this in the
follwoing way:
• Please include a kinamatic diagram (one for
velocity and one for acceleration).
• Please DO NOT solve this using velocity
analysis (cartesian vector analysis). I would
like it to be solved using scalar method. We
dont use 3D in this course. We only use scalar
analysis for the relative velocity equation
(writing the x and y components of the
equation and solving the equations for the
unknowns). I have attached a sample question
with solution in order to get an idea on how to
use the scalar method to solve my question. I
would like question 16-109 to be solved in a
similar way. Thank you for your
understanding.
If you can solve it as soon as possible that
would be great and I will give you a thumps up
and positive feedback :)
16-109. Member AB has the angular motions shown.
Determine the angular velocity and angular acceleration of
members CB and DC.
100 mm
D
60°
450 mm
W
AB
α AB
84
= 2 rad/s
= 4…
arrow_forward
2. There were 42 mangoes in each crate. 12 such crates of mangoes were delivered to a factory. 4 mangoes
were rotten and had to be thrown away. The remaining mangoes were packed into boxes of 10 mangoes
each. Write a numerical expression in MATLAB syntax to represent this situation and then find how many
boxes of mangoes were there?
OFocus
4:20 AM
28°C Mostly clear
3/26/2022
LG
CVENUENS
THANOS
BOBBLEHEAD
AMANLANTE A ON CABIA ANn
POCKET
YOP! AVENGES
KEYCHAIN
INFINITY WAR
Handy Fan
THANOS
BOBBLE HEAD
IGENA ERANLIA P COs CA AN
arrow_forward
Draw it on the graph provided please!
arrow_forward
MULTIPLE CHOICE -The answer is one of the options below please solve carefully and circle the correct option Please write clear .
arrow_forward
Matlab coding
arrow_forward
Can you write me a program manuscript using geometric definition on FAPT language.
The starting point is P1 and starts where the blue dot is. P1 = 0,0
arrow_forward
2:01
ul 4G 4.
A sulms.su.edu.om
While constructing a building, an engineer need to fix
two steel beams together using a bracket as shown
in Figure 1. Using absolute coordinate system,
construct a G-code program for drilling hole number
3 only. To remove the metal chips the hole should be
done in three equal steps. During the drilling, coolant
should be on before spindle starts and stop after
spindle stops. The spindle speed set to 1750 RPM.
Drilling bit in rack number 2 and it should be 1 mm
over the work piece. Drilling feed rate is 20 mm/min.
Explain each code used in the program in a
column
57.5-
12.5
Hole (4)
Hole (3)
30
Hole (1)
Hole (2)
ΧΟ Υ0ΖΟ
All dimensions shown are in mm
Figure 1
B.
->
28
•..
arrow_forward
READ THE INSTRUCTIONS!!!
DO NOT ANSWER THIS IF YOU ALREADY ANSWERED. I WILL DOWNVOTE.
ANSWER THIS COMPLETE, CORRECT, TYPEWRITTEN. I WANT IT TO BE DIGITALLY ANSWERED NOT HANDWRITTEN. I WILL UPVOTE IF YOU MEET THESE.
arrow_forward
I need help in the following MATLAB code. How do I add the code to answer the following question "Do you find more object detections in the image than the one that is cropped out? Explain how you would discriminate that from a dead pixel, a hot pixel, or a cosmic ray event."
fname = '00095337.fit';
fInfo = fitsinfo(fname);
img = fitsread(fname);
% Crop the image to show just the object:
img_cropped = img(1980:2030,1720:1780);
% Load the labeled image
img_labeled = imread('00095337_labeled_stars.png');
img_labeled = img_labeled(102:863,605:1363,:);
% Get rid of "hot" pixels (cosmic rays, disfunctional pixels)
max_acceptable_value = 1300;
img(img>max_acceptable_value) = max_acceptable_value;
% Plot the images
f1 = figure();
tgroup1 = uitabgroup('Parent',f1);
tab(1) = uitab('Parent', tgroup1, 'Title', 'Raw image');
ax(1) = axes('parent',tab(1));
imagesc(img)
axis equal
axis([0,size(img,2),0,size(img,1)]+0.5)
colormap(gray(256));
xlabel('x [px]')
ylabel('y [px]')…
arrow_forward
my matrix number is 8 , so choose EVEN matrix numbers side
arrow_forward
I need a MATLAB code that uses image segmentation to take this photo and single out the weeds in the yard. It also needs to calculate the number of pixels/percentage of the pixels that are in the weeds. Please provide notes in the lines as well so it is easy to follow and understand. Thank you for your help!
arrow_forward
.
arrow_forward
Write MATLAB commands to compute the sine , cosine and tangent of an array of numbers between 0 and 2pi (in steps of 0.1 ) . Save the original input array and all three output arrays to a single MAT file and then clear the workspace .
arrow_forward
Every time I use this code the two lies come up but they keep on showing up separately. I need one line on top of the other or make it look like one line just like it’s shown on the picture I need the two line together and make it one line. If you can please make the lines less curved make it look line the line on the picture.
With what I’m asking from you please fix it using this code using MATLAB and send back the code.
% Sample data for Diesel and Petrol cars
carPosition = linspace(1, 60, 50); % Assumed positions of cars
% Fix the random seed for reproducibility
rng(45);
% Assumed positions of cars
CO2Diesel = 25 + 5*cos(carPosition/60*2*pi) + randn(1, 50)*5; % Random data for Diesel
CO2Petrol = 20 + 5*sin(carPosition/60*2*pi) + randn(1, 50)*5; % Random data for Petrol
% Fit polynomial curves
pDiesel = polyfit(carPosition, CO2Diesel, 3);
pPetrol = polyfit(carPosition, CO2Petrol, 3);
% Generate points for best fit lines
fitDiesel = polyval(pDiesel, carPosition);
fitPetrol =…
arrow_forward
SEE MORE QUESTIONS
Recommended textbooks for you
Elements Of Electromagnetics
Mechanical Engineering
ISBN:9780190698614
Author:Sadiku, Matthew N. O.
Publisher:Oxford University Press
Mechanics of Materials (10th Edition)
Mechanical Engineering
ISBN:9780134319650
Author:Russell C. Hibbeler
Publisher:PEARSON
Thermodynamics: An Engineering Approach
Mechanical Engineering
ISBN:9781259822674
Author:Yunus A. Cengel Dr., Michael A. Boles
Publisher:McGraw-Hill Education
Control Systems Engineering
Mechanical Engineering
ISBN:9781118170519
Author:Norman S. Nise
Publisher:WILEY
Mechanics of Materials (MindTap Course List)
Mechanical Engineering
ISBN:9781337093347
Author:Barry J. Goodno, James M. Gere
Publisher:Cengage Learning
Engineering Mechanics: Statics
Mechanical Engineering
ISBN:9781118807330
Author:James L. Meriam, L. G. Kraige, J. N. Bolton
Publisher:WILEY
Related Questions
- Important instruction: These questions use the last three-digit value (L3D) of individual student matrix numbers. For example, if the matrix number is CD180264 then the L3D value is 264 (since the last three digits is 264). Some data require multiplication of the L3D value, for example, 10(L3D) means 10 x L3D subject name is INDUSTRIAL ENGINEERINGarrow_forwardMatlab Codearrow_forwardI need help with the purple line the line that you see one the graph on the picture needs to be on the graph. Use this code to add the purple line and make sure it’s crossing the orange line. Please make sure the lines are positioned the same way it is shown on the picture with the graph. Use this code on MATLAB and add the purple line. % Sample data for Diesel and Petrol cars carPosition = linspace(1, 60, 50); % Assumed positions of cars % Use the 'seed' function instead of 'rng' seed = 50; % Define your seed here rand('seed',seed); % Assumed CO2 emissions for Diesel and Petrol CO2Diesel = 25 + 5*cos(carPosition/60*2*pi) + randn(1, 50)*5; % Random data for Diesel CO2Petrol = 20 + 5*sin(carPosition/60*2*pi) + randn(1, 50)*5; % Random data for Petrol % Fit polynomial curves with a reduced degree of 2 pDiesel = polyfit(carPosition, CO2Diesel, 2); pPetrol = polyfit(carPosition, CO2Petrol, 2); % Generate points for best fit lines fitDiesel = polyval(pDiesel, carPosition);…arrow_forward
- Hi I need help to make the line change into a different color, I half of the line to be orange and I need the other half of the line towards the end to be purple as shown in the picture. Also I need there be a box saying Diesel, petrol, diesel best fit, petrol best fit. This part is also shown in the graph. Please use this code and fix it in MATLAB: % Sample data for Diesel and Petrol cars carPosition = linspace(1, 60, 50); % Assumed positions of cars % Fix the random seed for reproducibility rng(50); % Assumed positions of cars CO2Diesel = 25 + 5*cos(carPosition/60*2*pi) + randn(1, 50)*5; % Random data for Diesel CO2Petrol = 20 + 5*sin(carPosition/60*2*pi) + randn(1, 50)*5; % Random data for Petrol % Fit polynomial curves pDiesel = polyfit(carPosition, CO2Diesel, 3); pPetrol = polyfit(carPosition, CO2Petrol, 3); % Generate points for best fit lines fitDiesel = polyval(pDiesel, carPosition); fitPetrol = polyval(pPetrol, carPosition); % Combine the best fit lines combinedFit =…arrow_forwardImportant instruction: This question uses the last three-digit value (L3D) of individual student matrix number. For example, if the matrix number is CD180264 then the L3D value is 264 (since the last three digits is 264). Some data require multiplication of the L3D value, for examAdditional instruction: These questions use the last three-digit value (L3D) of individual student matrix number. Example, if the matrix number is CD180264 then the L3D value is 264 (since the last three digits is 264). Some data require multiplication of the L3D value, for example 10(L3D) means 10 x L3D.ple 10(L3D) means 10 x L3D. subject name isarrow_forwardQ4: Create a Visual Basic Project to find the value of the following series: h? h4 h3 cos(h) = h – 2! 3! 4! Write the code program so that the value of angle (h) is entered into inputbox. Estimate the value of series (cos(h)) so that the absolute value of any term is greater or equal to 10-6. Display the required number of terms (N) which it used in this series in a text box and display the result of series (cos(h)) in another separate text box.arrow_forward
- The Pascal triangle can be displayed as elements in a lower-triangular matrix as shown on the right. Write a MATLAB program that creates a n × n matrix that displays n rows of Pascal’s triangle. Use the program to create 4 and 7 rows Pascal’s triangles. (One way to calculate the value of the elements in the lower portion of the matrix isarrow_forwardQ1: write a program to enter any text and compute its length. Q2: Design a form with a text box. Use select statement so that when user enters g, b, r and y then form colored to green, blue, red, and yellow respectively. Q3: Write a program to print multipliers of 5 (from 5 to 50)arrow_forwardPlease draw 5 and 6arrow_forward
- Create an illustration or diagram of the amusement park ride called THE BUMPER CAR RIDE, then proceed to add labels based on the guidelines provided within the image. The screenshot is the example of the diagram BUT THAT IS A DIAGRAM OF THE GRAVITRON RIDE. I need an illustration DIAGRAM OF THE BUMPER CAR RIDE, do not answer using AI.arrow_forwardI’m using this code in MATLAB but for some odd reason every time I run it on MATLAB I keep on getting a different graphs. In the picture that shows two different graphs are from the same code, but I need to it to look like the picture that has one graph. Could you please fix it. To make it look like the picture that has one graph? Here is the code: % Sample data for Diesel and Petrol carPosition = linspace(1, 60, 50); % Assumed positions of cars CO2Diesel = 25 + 5*cos(carPosition/60*2*pi) + randn(1, 50)*5; % Random data for Diesel CO2Petrol = 20 + 5*sin(carPosition/60*2*pi) + randn(1, 50)*5; % Random data for Petrol % Fit polynomial curves pDiesel = polyfit(carPosition, CO2Diesel, 3); pPetrol = polyfit(carPosition, CO2Petrol, 3); % Generate points for best fit lines fitDiesel = polyval(pDiesel, carPosition); fitPetrol = polyval(pPetrol, carPosition); % Plotting the data figure; hold on; scatter(carPosition, CO2Diesel, 'o', 'MarkerEdgeColor', [1 0.5 0]); % Diesel data…arrow_forwardThe picture that has two graphs are generated by this code. Every time I run it on MATLAB it keeps generating graphs with different curves. The picture that shows one graph is the curve that I want to keep. Please keep the color of the lines and the circles and keep the title of the graph the same. I want everything to be the same except I want the line to look exactly like the picture with one graph on it. Use this code on MATLAB and fix it and then send the correct code back please. % Sample data for Diesel and Petrol cars carPosition = linspace(1, 60, 50); % Assumed positions of cars % Use the 'seed' function instead of 'rng' seed = 50; % Define your seed here rand('seed',seed); % Assumed CO2 emissions for Diesel and Petrol CO2Diesel = 25 + 5*cos(carPosition/60*2*pi) + randn(1, 50)*5; % Random data for Diesel CO2Petrol = 20 + 5*sin(carPosition/60*2*pi) + randn(1, 50)*5; % Random data for Petrol % Fit polynomial curves with a reduced degree of 2 pDiesel = polyfit(carPosition,…arrow_forward
arrow_back_ios
SEE MORE QUESTIONS
arrow_forward_ios
Recommended textbooks for you
- Elements Of ElectromagneticsMechanical EngineeringISBN:9780190698614Author:Sadiku, Matthew N. O.Publisher:Oxford University PressMechanics of Materials (10th Edition)Mechanical EngineeringISBN:9780134319650Author:Russell C. HibbelerPublisher:PEARSONThermodynamics: An Engineering ApproachMechanical EngineeringISBN:9781259822674Author:Yunus A. Cengel Dr., Michael A. BolesPublisher:McGraw-Hill Education
- Control Systems EngineeringMechanical EngineeringISBN:9781118170519Author:Norman S. NisePublisher:WILEYMechanics of Materials (MindTap Course List)Mechanical EngineeringISBN:9781337093347Author:Barry J. Goodno, James M. GerePublisher:Cengage LearningEngineering Mechanics: StaticsMechanical EngineeringISBN:9781118807330Author:James L. Meriam, L. G. Kraige, J. N. BoltonPublisher:WILEY
Elements Of Electromagnetics
Mechanical Engineering
ISBN:9780190698614
Author:Sadiku, Matthew N. O.
Publisher:Oxford University Press
Mechanics of Materials (10th Edition)
Mechanical Engineering
ISBN:9780134319650
Author:Russell C. Hibbeler
Publisher:PEARSON
Thermodynamics: An Engineering Approach
Mechanical Engineering
ISBN:9781259822674
Author:Yunus A. Cengel Dr., Michael A. Boles
Publisher:McGraw-Hill Education
Control Systems Engineering
Mechanical Engineering
ISBN:9781118170519
Author:Norman S. Nise
Publisher:WILEY
Mechanics of Materials (MindTap Course List)
Mechanical Engineering
ISBN:9781337093347
Author:Barry J. Goodno, James M. Gere
Publisher:Cengage Learning
Engineering Mechanics: Statics
Mechanical Engineering
ISBN:9781118807330
Author:James L. Meriam, L. G. Kraige, J. N. Bolton
Publisher:WILEY