MATLAB: Is it necessary to declare functions and function calling in matlab code for hdl conversion

HDL Codermatlab functionmatlabr2013a

Hello, I'm working on a project 'PCA' which deals with large valued random matrix, currently I'm dealing with 10×5 random matrix. I'v used simple matlab functions like eig, rand and likewise, but didnot include any function declaration and function calling. And also I'm unable to convert my code in vhdl through hdl coder.

Best Answer

As far as I recall, HDL Coder will refuse to compile a script as the main object. You must put a function header on the script in order to make it the entry point.
Related Question