If you have R2018a (or later) use the bandpass (link) function. If you use the ‘d’ output, remember to use the filtfilt function with it (since bandpass produces an IIR filter by default), rather than filter, that only works correctly with linear-phase FIR filters, such as those produced by fir1. (I consider this to be an error in the bandpass function documentation.)
Otherwise, search MATLAB Answers for ‘bandpass’. I’ve posted several well-documented examples over the years.