Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Looking for the MatLab code written out using the text files as if you had them.

ID: 3825088 • Letter: L

Question

Looking for the MatLab code written out using the text files as if you had them. The names of the text files are exactly as shown in the question. Also, each text file has 4 columns of data.

i. Consider the 3 text files labeled "aluminum-test", 5-MIL-test" and "2-MIL-test" that are uploaded and attached to the assignment link.This data was collected when running Arizona State University's shocktube during an AEE 362 (High Speed Aerodynamics) laboratory experiment. The tests show data for 3 different shock wave experiments where shocks of different strengths were intentionally generated. Note that the first two columns represent pressure data (reported in psi) and that columns 3 and 4 show pressure data in units of Volts. Therefore, the data in columns 3 and 4 must be converted to useful units before it can be plotted. The conversion is given below. giving you a result in PSI. PSI 0.0418 mV Your task is to: a. Load this data into MATLAB (hint load0 you may also need to remove the textat the top of the data file) b. Find the total time of the dataset, noting that the time between data points is 0.025 ms c. Add 14.0 to all the values in the second column. Plot this data together with that of the first column vs. time. Knowing that this is pressure, what appears to be happening? d. Plot the data in columns 3 and 4 ws. time, after this data has been converted to PSI. These sensors were mounted inside the tube and represent changes in pressure over time. What can you see from the data? (quick comment) e. The distance between the two pressure transducers is given as 48-s n. Knowing this, we can use the "peaks from the data in the plot from (d) (showing two changes in pressure at two different locations) to calculate the speed of the resulting shockwave. After generating the plot, use the "cursor tool" and find the 4t between the two peaks u may also need to zoom in considering it is the first two peaks weareinterested in). The velocity ofthe wave can then be calculated using: At where 4x is the distance between pressure sensors. Compare shock speeds between the materials (no comments/analysis needed but look at the results!) The material strength are in the order: 5 Mil, 2Mil, Aluminum.

Explanation / Answer

Submission Instructions:Your solutions to this assignment must be typed and neatlypresented. Unorganized solutions and/or solutions that do not present the requireddeliverables will not be graded and receive a score of zero. This assignment is to besubmitted, in PDF format, to the assignment link on blackboard by the deadline.Students who obtain a score of 80% or greater on this project will receive credit for all courseoutcomes.1. [45 pts] Part 1 – “For” and “While” loops in MATLABi.Consider the approximation for sin(x) given in homework #3 as:?°± ² = ² ²3³!+²5´!²7µ!+²9¶!²11··!+²13·³!²15·´!+²17·µ!Create a vector where each element is a term of the series. Allow the user to input the valueof x (as a scalar). Sum the terms of the series using a “for” loop and create a formatted outputto show the user (1) the value of the approximation, (2) the actual value of sin(x) (from theMATLAB function) and (3) the error between the two. Use values x = 2, 2.5, 3 to compare.ii.Now consider the generalized form of the Taylor series for sin(x):sin ² = (·)¸²2¸¹1(º± + ·)!¸»0Sum the first 100 terms of the series and show the result as a formatted output identical tothat of 1(i). Allow the user to input the value of x as a scalar. Repeat this problem with thefirst 250 terms. Compare the results. (Use same x values as from (i)).iii.How many terms are required in (iii) to reduce the relative error to less than 1%?0.00001%?Assume that the relative error (percent) is defined as:% ¼???? = |(½¾¿½À)½¾| × ·ÁÁÂÃ= sin ²,ÂÃ= Ä(·)±²º±+·(º±+·)!ű=Áwhere Stand Snare the true and numerical solutions, respectively. The “numerical” solutionwill come from the summation of terms while the true solution can be obtained using thebuilt-in MATLAB function for sin(x). Each iteration through the loop, create a formattedoutput that shows (1) the iteration number, (2) the number of terms in the series and (3) the

percent error between the obtained values. The output printed during the loop should bedone so that a new line is created each time a new output is printed. When the loop hascompleted, display the result, the final percent error, and the number of terms using a singlecommand. Save the percent error per iteration and plot % error vs. iteration when the loophas completed.iv.For (iii), create a flowchart showing the logic of your code. Considering that this is the courseproject, please be sure to create this flowchart in a word editor (i.e. it must be typed!).2. [55 pts] Part 2 – Processing data with MATLABi.Consider the 3 text files labeled “aluminum_test”, “5_MIL_test” and “2_MIL_test” that areuploaded and attached to the assignment link. This data was collected when runningArizona State University’s shocktube during an AEE 362 (High Speed Aerodynamics)laboratory experiment . The tests show data for 3 different shock wave experiments whereshocks of different strengths were intentionally generated. Note that the first two columnsrepresent pressure data (reported in psi) and that columns 3 and 4 show pressure data inunits of Volts. Therefore, the data in columns 3 and 4 must be converted to useful unitsbefore it can be plotted. The conversion is given below, giving you a result in PSI.°±²= 0.0418?³Your task is to:a. Load this data into MATLAB (hint: load() – you may also need to remove the text at the top ofthe data file).b. Find the total time of the dataset, noting that the time between data points is 0.025 ms.c. Add 14.0 to all the values in the second column. Plot this data together with that of the firstcolumn vs. time. Knowing that this is pressure, what appears to be happening?d. Plot the data in columns 3 and 4 vs. time, after this data has been converted to PSI. Thesesensors were mounted inside the tube and represent changes in pressure over time. Whatcan you see from the data? (quick comment)e. The distance between the two pressure transducers is given as 48132in. Knowing this, we canuse the “peaks” from the data in the plot from (d) (showing two changes in pressure at twodifferent locations) to calculate the speed of the resulting shockwave. After generating theplot, use the “cursor tool” and find the´?between the two peaks (you may also need to zoom-in considering it is the first two peaks we are interested in). The velocity of the wave can thenbe calculated using:xtwhere´µis the distance between pressure sensors. Compare shock speeds between thematerials (no comments/analysis needed – but look at the results!).The material strengths are in the order: 5 Mil, 2Mil, Aluminum.

Solution for Q1(iii). x=60; %considered ange for the check
x=x*pi/180; %deg to radians
St=sin(x);
n=0;
Sn=0;
error=100;
while error>1E­4 Sn=Sn+((­1)^n*x^(2*n+1)/factorial(2*n+1));...

Dr Jack
Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Chat Now And Get Quote