The Matlab Coding used for performing ADC operation of MCP3008 by Arduino Mega 2560 Board is attached below, the file name known is "subroutine_MCP3008.m", please refer to it.
I did. That code requires that a Firmata sketch be loaded on the Arduino, making it, basically, an idiot. If you then expect the brainless Arduino to do something on a regular basis, you must tell it to do it EVERY TIME IT NEEDS TO DO IT.
It is then MatlLab's responsibility to store the data. You won't be making any changes to the Arduino code to make this happen.