Ass7

.pdf

School

Alabama A&M University *

*We aren’t endorsed by this school

Course

101

Subject

Mechanical Engineering

Date

Apr 3, 2024

Type

pdf

Pages

14

Uploaded by BailiffRock13777

Report
Ja’Reione Melton Engineering Programming Assignment 7 Alabama A&M University Dr. Gadalla ME 104-01
Q1 A. Define a bin of 20 pound each starting from 100 to 340 , find the frequency, relative frequency, scaled frequency histogram Y = input ('please enter raw data in bracket'); X = 100:20:340; hist(Y,X); ylabel ('Absolute frequency'); xlabel ('Strength'); title ('Absolute frequency for 20 tests'); % relative frequency Y1 = hist (Y,X)/38; figure(2) bar(X,Y1); ylabel ('Relative frequency'); xlabel ('Strength'); title ('Relative frequency for 20 tests'); % scaled frequency area = Y1*20; t_area = sum(area); Y_scaled = Y1/t_area; figure(3) bar(X,Y_scaled); ylabel ('scaled frequency'); xlabel ('Strength'); title ('scaled frequency diagram'); grid on 1
2
3
B. What is the probability the a student is picked and his weight 165 pound or less % fitting a normal probabilty curve mu = mean (Y_raw); s = std(Y_raw); fprintf ('\n average of the data = %6.2f, standard deviastion %6.2f', mu,s); n = input ('\n please enter 1 for bigger or equal 2 between two number 3 less than or equal'); if n == 1 % bigger than or equal %calcilating probabilty that input number is bigger than or equal bin b1 = input('\n please enter the treshhold number'); P1 = 1 - (1+erf((b1-mu)/(s*sqrt(2))))/2; elseif n == 3 % less than or equal 4 b1 = input('\n please enter the treshhold number');
Your preview ends here
Eager to read complete document? Join bartleby learn and gain access to the full version
  • Access to all documents
  • Unlimited textbook solutions
  • 24/7 expert homework help