i loaded this program just fine but not sure how to the data points from 500 to
ID: 3750891 • Letter: I
Question
i loaded this program just fine but not sure how to the data points from 500 to 800 and dont know how to add a comment section? This Program is for Matlab.
Handel's Messiah Assig Pá . Follow the code presented in the lecture notes Load Handel's Messiah in your program . Plot the voltages (y) as a function of t for the 500th to the 800th data point . Add a comment section to your code and discuss whether the t vector is a time vector or a counting vector (just numbers)-if it is a counting vector, speculate on how you could convert it to "time"Explanation / Answer
To plot a 2-d line plot in MATLAB you need to use the plot function : plot(X, Y) where X and Y are vectors.
Assuming your data points are vectors, to extract 500 to 800th data point you need to use T(500:800).
Thus in your case you need to use plot(T(500:800) , Y) where y is voltage vector.
For comments simply start a line with % MATLAB ignores everything written after % mark.
For multiple line comments type %{ before the first line and %} after the last line.
Related Questions
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.