The simple answer is that you need to write a testbench.
How do you know that your MATLAB code is correct in implementing your algorithm? A testbench, written in MATLAB. It supplies inputs to your design and reads the design's outputs. It can perform whatever sort of checking you wish to ensure that your design file is operating correctly. It can plot output data, calculate the results using a different method, or whatever you can imagine to ensure that your code is correct. It is vastly faster to validate that your MATLAB code is correct using MATLAB, than it is to run through the full toolchain and see if the FPGA behaves as desired.
Unless you have provided explicit integer or fixed-point data types for every variable in your design, the testbench also helps define what the data types are. MATLAB code is typically written using double data types for variables, which is not generally synthesizable to an FPGA. HDL Coder can use the ranges of the data supplied by your testbench to the design to determine what data type to make each variable in the model. Thus, it is doubly important to write a good testbench, as the testbench will indirectly determine the size of your datapath throughout your design.