Find Maximum and Minimum values of Given Elements Using MATLAB
$19.00$14.00677 reads
Question
For the following, write the commands in a script file leaving the semi-colon off so the answers print in the command window. Turn in the script and output. Output should include:
a. number of elements in ts1
b. number of elements in ts2
c. first element in ts1
d. first element in ts2
e. sum of ts1
f. minimum value in ts1
g. mean of ts1
h. first element in tsRev
i. last element in tsRev
Create a script that first creates two variables, ts1 and ts2. Use linspace to create ts1 and the : operator to create ts2.
- Both ts1 and ts2 should start at 0 and end at 1, and have (approximately) 100 elements.
- Check that the number of elements is approximately correct using the command length on both variables
- Check that the first element of each array is, indeed, zero, by accessing the first element using the ts(1) syntax.
- Check that the last element of each array is, indeed, 1, by accessing the last element of each array
- Hint: What do you put in the () to get the last element?
- Calculate the sum, min and average (mean) of the ts1 array
- What should the min value be?
- What should the mean value be?
- Use linspace to create an array tsRev that has the same values as ts1, but in reverse order.
- Check the first and last values of tsRev.
Summary
This question belongs to MATLAB software and discusses about application of MATLAB in mathematics to find out the maximum and minimum values in a group of given elements.
Related Solutions
MATLAB Functions – Upper Triangle FormMATLAB Program that Determine Linear and Quadratic Best Fit CurveCreate a Surface Height Field Over a Plane Using MATLABRelationship between Time and Height Using MATLABFind Expression For Magnetic Field At The OriginFind Norton Equivalent Circuit Values In A Circuit
Recently Uploaded Solutions
Write an Essay on the Importance of Public RelationsWrite an essay on the positive impact of shareholder power on bonWrite An Essay On What You Want From Work And How To Achieve ItWrite an essay/report on Marketing Mix OrientationWrite an interview structure about poultry litter convert to bio Write Article Reflection On The Article “Improving Teaching And
Most Downloaded Solutions
