%% IDENTIFICATION % Name: Autar Kaw, T Pain, George Clooney (Put your names here) % Title: Brinell Hardness Calculator % Course Name: Computational Methods % Course Number: EML3041 % Date of Submission: August 1, 2016 % Semester: Fall 2011 %% SPECIFICATIONS % Specifications: Write a Matlab Worksheet % where the values of L, D, and d, are written in the beginning of the % matlab worksheet and then computes and displays the Brinell Hardness. %% INPUTS and DISPLAYING INPUTS clc L = -3000; D = 10; d = 7.2; fprintf('\nThe Load Applied in kgf is L=%d',L) fprintf('\nThe Diameter of the Indented Load in mm is D=%d',D) fprintf('\nThe Diameter of the Indent in mm is L=%d',d) if L<0 fprintf('\nThe load chosen is negative') exit end %% CODE %Calculating the hardness using the formula HB=L/((pi*D/2)*(D-sqrt(D^2-d^2))); %% DISPLAYING OUPUTS fprintf('\nThe Hardness of the Material is HB=%d',HB)