(Last Updated On: October 27, 2015)
How C++ call Matlab functions
Follow these instructions as example
Call MATLAB Functions from C/C++ Applications
- To see engdemo.c , open this file in MATLAB® Editor.
- To see the Windows version engwindemo.c , open this file.
- There is a C++ version of engdemo in the matlabroot \extern\examples\eng_mat folder. To see engdemo.cpp , open this file
This was suggested by Alex at https://alexabosi.wordpress.com/
Well, I included the ‘fstream’ header file to print numbers to .txt so I could quickly check the outputs as I worked.
float Best_Bid; // defined earlier
/*calculate best bid/ask*/
bid_output << Best_Bid << std::endl;
Join my FREE newsletter to see how I accomplish this
I now post my TRADING ALERTS
into my personal FACEBOOK ACCOUNT
. Don't worry as I don't post stupid cat videos or what I eat!