The form for the boundary conditions expected by the solver is
Since you have a system of two equations, each p and q should be a two-element vector defining the left and right boundary conditions for each equation. Notice that the second term is written in terms of the flux, which you define as the f output in the pde function, and which can differ by component.
(For an example of setting boundary conditions with multiple equations, see the pdex4 example file by typing edit pdex4 in MATLAB.)