Write a function allparts that will read in lists of part numbers for parts produced by two factories. These are contained in data files called xyparts.dat and qzparts.dat
belongs to book: MATLAB: A Practical Introduction to Programming and Problem Solving|Stormy Attaway|Fourth Edition| Chapter number:14| Question number:9.14
All Answers
total answers (1)
allparts.m
function outvec = allparts
% Reads in parts list from 2 data files
% Format of call: allparts or allparts()
% Returns a sorted list of all factory parts
load xyparts.dat
load qzparts.dat
outvec = union(xyparts,qzparts);
end
need an explanation for this answer? contact us directly to get an explanation for this answer