Question: write a MATLAB code that performs following calculations - Find the mean and variance of each subgroup ( which are divided into 3 x 3

write a MATLAB code that performs following calculations-
Find the mean and variance of each subgroup( which are divided into 3 x 3 matrices with the help of those blue lines)
Mean =1/9(sum all 9 elements)
Standard Deviation (SD)=1/9 SUM[(each element mean)^2]
Comparison: Create a table where all means and SDs of all subgroups are subtracted from each other
|M(i,j)-M(i+n,j+m)| where n&m use mod 4 arithmetic
|SD(i,j)-SD(i+n,j+m)| where n&m use mod 4 arithmetic
If |M(i,j)-M(i+n,j+m)|= MT & |SD(i,j)-SD(i+n,j+m)|= SDT Then, the two subgroups could be part of the same body. To confirm that calculate the distance: D(i, j)= SQRT{[(i,j)-(i+n,j+m)]^2}
If D(i,j)= DT Then, the two subgroups belong to the same body. (blue color)
Simulate the prelab assignment for the following Delta threshold and color the subgroups as follows:
If D(i,j)= DT Then, the two subgroups belong to the same body. (blue color)
If D(i,j)= DT +25% Then, the two subgroups belong to the same body. (yellow color)
If D(i,j)= DT +50% Then, the two subgroups belong to the same body. (Orange color)
If D(i,j)> DT +50% Then, the two subgroups belong to the same body. (red color)
Delta =0,.25,.5,.75,1
Mean Threshold (MT)=.25+ Delta
SD Threshold (SDT)=.25+ Delta
Distance Threshold (DT)=2^0.5+ Delta

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!