Task: 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’. The function will return a vector of all parts produced, in sorted order (with no repeats). Calling the function would return the following:

`>> partslist = allpartspartslist =102 111 123 145 333 456 876 903`

Here is what I get:

`function outv=allparts(xyparts,qzparts)clcload xyparts.dat;load qzparts.dat;un=union(xyparts,qzparts);disp('The result of the function:')disp(sort(un))end`

Please, help to fix the problem!

## Best Answer