You are studying the number of defective parts produced each week by several machines to help adjust maintenance protocols.
Assume the rows of matrix Def represent different machines and all columns except the last represent weeks. The last column contains the long-term average of the number of defects per week produced by that machine. Write a short section of MATLAB code that will generate a new matrix Comp with the same number of rows but one fewer columns as described.
The code will compare each value in the matrix, except those in the last column, to the value in the last column of the same row to compare the number of defective parts produced by each machine each week with that machine’s long-term defect rate.
- If the number of errors equals that machine’s average, the corresponding element in the new matrix Comp will equal 0.
- If the number of errors is greater than machine’s average, the corresponding element in the new matrix Comp will equal 1.
- If the number of errors is less than that machine’s average, the corresponding element in the new matrix Comp will equal –1.
Example:
Want to see the full answer?
Check out a sample textbook solutionChapter 19 Solutions
THINKING LIKE AN ENGINEER W/ACCESS
- Help with the MATLAB code to do the following: Given an audio recording of vehicles, compute Power Spectral Density, 1/3 octave band level, octave band level, A-weighted Leq, C-weighted Leq, L10 (unweighted since sample is short), L90 (unweighted since sample is short). If the measurement is made at approximately 50 ft, and that the vehicles are moving at an average of 65 mph, what is the flow rate Q? If instead, the noise is dominated by 1-2 motorcycles, how fast are they going? Given- -The data are in counts -Calibration factor is 133 uPa/count -Sample rate is 44100Hz. -Remember that in air the dB reference is 20 uPa -Pwelch requires that the inputs are doublesarrow_forwardUsing MATLAB editor, make a script m-file which includes a header block and comments: Utilizing the ideal gas law: Vmol= RT/P Calculate the molecular volume where: R = 0.08206 L-atm/(mol-K) P = 1.015 atm. and T = 270 - 315 K in 5 degree increments Make a display matrix which has the values of T in the first column and Vmol in the second column Save the script and publish function to create a pdf file from the script in a file named "ECE105_Wk2_L1_Prep_1"arrow_forwardUSE MATLAB (Convolutional Code) The vector representation of a convolutional code is g1=[1 1]and g2=[1 0]. If the received sequence is 11 11 01 10, please use Viterbi Algorithm todecode it. Please show the full trellis diagram, including the updated trellis statemetrics.arrow_forward
- Find the local maximum and minimum values and saddle point(s) of the function. You are encouraged to use a calculator or computer to graph the function with a domain and viewpoint that reveals all the important aspects of the function. (Enter your answers as comma-separated lists. If an answer does not exist, enter DNE.) f(x, y) = 9 sin(x) sin(y), −? < x < ?, −? < y < ? local maximum value(s) local minimum value(s) saddle point(s) (x, y) =arrow_forwardYou are the mechatronics engineer of a manufacturing plant. You decide to perform an analysis on a robot arm of the assembly line with the objective of optimizing its performance. After taking several readings of the speed of the arm’s end effector, you approximate its velocity to the function given below. v(t) = -t4 + 5t3 - 7t2 + 3t + 0.22 0 =< t =< 3 where the velocity is in ms-1 Use your knowledge of differentiation to sketch the velocity-time graph, clearly marking the critical points. Using the graph sketched in (a) above, estimate the velocity when t = 1.5 s Calculate the velocity of the function when t = 1.5 s by substituting to the velocity function. Compare this value to the value you estimated in b above.arrow_forwardSuppose your CFD code can handle nonelementary blocks. Combine as many blocks of Fig. as you can. The only restriction is that in any one block, the number of i-intervals and the number of j-intervals must be constants. Show that you can create a structured grid with only three nonelementary blocks. Renumber all the blocks and indicate how many i- and j-intervals are contained in each block. Add up all the cells and verify that the total number of cells does not change.arrow_forward
- Please provide the correct matlab code for the following question.arrow_forward1. Circle weather the following statements are true or false. If the statement is true justify your reasoning if the statement is false correct the statement to make it true or justify why it is false a. Impulse is the integral of a force vs distance graph b. In two dimensions analyzing linear and angular momentum provides up to three scalar equations. c. Linear acceleration and angular acceleration both have units of ft/s^2 or m/s^2 d. When absolute motion or a rigid body it is important to find a function that relates linear and angular position then integrate to find velocity e. Instantaneous centers can only be determined for velocity and only for a snapshot in timearrow_forwardCan you answer quickly 9)Let A axis team consist of XA, YA and ZA vectors, and B axis team consists of vectors XB, YB and ZB. Let the expression of the origin of the A axis set on the B axis set be denoted by BPAORG. Let BVA denote the representation of the vector VA on the B axis set. Let it be defined as BAR = [BXA BYA BZA]. BAR BPAORG0 0 0 1 Let the 4x4 matrix given as BAT. So what is the result of BAT ACT CBT matrix multiplication? Matrix whose diagonal elements are zero and whose other elements are aZero matrixMatrix whose all elements are oneIdentity matrixarrow_forward
- A member of your team gives you the following MATLAB program. Your job is to create the function used in the program. H = 30; % height [cm] V = 50; % volume [cm^3] % calculates the radius [cm] of a cone R2 = RadiusCone(H,V);arrow_forwardHW Matlab 1) Create a variable ftemp to store a temperature in degrees Fahrenheit (F). Write m-file to convert this to degrees Celsius and store the result in a variable ctemp. The conversion factor is C = (F —32) * 5/9. 2) Write m-file to generate a matrix of random integers of size 100 by 100 their values between 15 to 80. 3) Free fall of objects is given by y =5mgt? where a is the acceleration, v is the velocity, y is the distance, m is the mass of the object, g is the gravitational acceleration. Plot the distance and velocity of the object for 15 seconds after its fall from rest (y = 0). Take m = 0.2 kg.arrow_forwardI am trying to find a Direction Cosine Matrix (DCM) for the Euler angle body 1-2-3 sequence. I tried making my own function and using the MATLAB function, but the result is matrices that are not equal to each other. But, if I were to use the 'ZYX' sequence, I would get a matrix that is equal to the transpose of the matrix produced by my function.I mean that transpose(EA123toDCM) = E123toDCM if I changed the sequence to 'ZYX'. I never got two equal matrices. Can you fix my code so I would get two equal DCM matrices for the body 1-2-3 sequence? Also, for the E123toDCM line, I am using the sequence 'XYZ'. Is that correct or should it be 'ZYX'? I know that that for a DCM of sequence 1-2-3 = R3(theta1)*R2(theta2)*R1(theta3). Is ZYX sequence the same as a 1-2-3 sequence? EA = [pi/3; -pi/4; -pi/6];EA123toDCM = EA123DCM(EA) E123toDCM = angle2dcm(EA(1,1), EA(2,1), EA(3,1), 'XYZ') function [R] = EA123DCM(EA) theta1 = EA(1,1); theta2 = EA(2,1); theta3 = EA(3,1); R1 =…arrow_forward
- 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