A data file “parttolerance.dat” stores, on one line, a part number, and the minimum and maximum values for the valid range that the part could weigh
belongs to book: MATLAB: A Practical Introduction to Programming and Problem Solving|Stormy Attaway|Fourth Edition| Chapter number:4| Question number:9.4
All Answers
total answers (1)
parttol.m
load parttolerance.dat
partno = parttolerance(1);
minwt = parttolerance(2);
maxwt = parttolerance(3);
partwt = input('Enter the part weight: ');
if partwt > minwt && partwt < maxwt
fprintf('The part %d is within range\n',partno)
else
fprintf('The part %d is not in range\n',partno)
end
need an explanation for this answer? contact us directly to get an explanation for this answer