Question: MATLAB FUNCTION Load the data from file normtemp.txt found using the load() function First, load all three columns of data into a matrix X The
MATLAB FUNCTION
Load the data from file normtemp.txt found using the load() function
First, load all three columns of data into a matrix X
The data is arranged in columns as follows: temperature, sex, age
| temp | sex | age | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
|
Then, create a matrix variable temp for just the first column of X, which is the temperature
Generate a histogram with 12 bins
Label the x-axis Temperature
Label the y-axis Frequency
The title should be Temperature for Adult Males and Females
Now explore MATLABs built-in functions to calculate the following quantities for the temperature data.
mean(vector)
median(vector)
mode(vector)
var(vector)
std(vector)
min(vector)
max(vector)
Write a function called mystat.m that takes a vector of data and prints out all these descriptive statistics functions applied to the vector of data, and the length of the data vector. Run your function on the temp vector.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
