Closed gargisri68 closed 5 years ago
Solved it myself...
add mxComplexity ComplexFlag = mxREAL; in mex_regressionRF_train.cpp and mex_regressionRF_predict.cpp
Replace plhs[8] = mxCreateNumericMatrix(n_size, 1, mxDOUBLE_CLASS, 0); with
plhs[8] = mxCreateNumericMatrix(n_size, 1, mxDOUBLE_CLASS, ComplexFlag);
wherever it appears in both the files.
When I execute compile.m I get the following error:
Error using mex mex_regressionRF_train.cpp C:\Users\DELL7810\Desktop\GargiSrivastava_16071009\Semester6\drfi_matlab-master\randomforest-matlab\RF_Reg_C\src\mex_regressionRF_train.cpp(68): warning C4267: 'initializing': conversion from 'size_t' to 'int', possible loss of data C:\Users\DELL7810\Desktop\GargiSrivastava_16071009\Semester6\drfi_matlab-master\randomforest-matlab\RF_Reg_C\src\mex_regressionRF_train.cpp(69): warning C4267: 'initializing': conversion from 'size_t' to 'int', possible loss of data C:\Users\DELL7810\Desktop\GargiSrivastava_16071009\Semester6\drfi_matlab-master\randomforest-matlab\RF_Reg_C\src\mex_regressionRF_train.cpp(124): error C2664: 'mxArray mxCreateNumericMatrix_730(std::size_t,std::size_t,mxClassID,mxComplexity)': cannot convert argument 4 from 'int' to 'mxComplexity' C:\Users\DELL7810\Desktop\GargiSrivastava_16071009\Semester6\drfi_matlab-master\randomforest-matlab\RF_Reg_C\src\mex_regressionRF_train.cpp(124): note: Conversion to enumeration type requires an explicit cast (static_cast, C-style cast or function-style cast) C:\Users\DELL7810\Desktop\GargiSrivastava_16071009\Semester6\drfi_matlab-master\randomforest-matlab\RF_Reg_C\src\mex_regressionRF_train.cpp(131): error C2664: 'mxArray mxCreateNumericMatrix_730(std::size_t,std::size_t,mxClassID,mxComplexity)': cannot convert argument 4 from 'int' to 'mxComplexity' C:\Users\DELL7810\Desktop\GargiSrivastava_16071009\Semester6\drfi_matlab-master\randomforest-matlab\RF_Reg_C\src\mex_regressionRF_train.cpp(131): note: Conversion to enumeration type requires an explicit cast (static_cast, C-style cast or function-style cast) C:\Users\DELL7810\Desktop\GargiSrivastava_16071009\Semester6\drfi_matlab-master\randomforest-matlab\RF_Reg_C\src\mex_regressionRF_train.cpp(136): error C2664: 'mxArray mxCreateNumericMatrix_730(std::size_t,std::size_t,mxClassID,mxComplexity)': cannot convert argument 4 from 'int' to 'mxComplexity' C:\Users\DELL7810\Desktop\GargiSrivastava_16071009\Semester6\drfi_matlab-master\randomforest-matlab\RF_Reg_C\src\mex_regressionRF_train.cpp(136): note: Conversion to enumeration type requires an explicit cast (static_cast, C-style cast or function-style cast) C:\Users\DELL7810\Desktop\GargiSrivastava_16071009\Semester6\drfi_matlab-master\randomforest-matlab\RF_Reg_C\src\mex_regressionRF_train.cpp(144): error C2664: 'mxArray mxCreateNumericMatrix_730(std::size_t,std::size_t,mxClassID,mxComplexity)': cannot convert argument 4 from 'int' to 'mxComplexity' C:\Users\DELL7810\Desktop\GargiSrivastava_16071009\Semester6\drfi_matlab-master\randomforest-matlab\RF_Reg_C\src\mex_regressionRF_train.cpp(144): note: Conversion to enumeration type requires an explicit cast (static_cast, C-style cast or function-style cast) C:\Users\DELL7810\Desktop\GargiSrivastava_16071009\Semester6\drfi_matlab-master\randomforest-matlab\RF_Reg_C\src\mex_regressionRF_train.cpp(149): error C2664: 'mxArray mxCreateNumericMatrix_730(std::size_t,std::size_t,mxClassID,mxComplexity)': cannot convert argument 4 from 'int' to 'mxComplexity' C:\Users\DELL7810\Desktop\GargiSrivastava_16071009\Semester6\drfi_matlab-master\randomforest-matlab\RF_Reg_C\src\mex_regressionRF_train.cpp(149): note: Conversion to enumeration type requires an explicit cast (static_cast, C-style cast or function-style cast) C:\Users\DELL7810\Desktop\GargiSrivastava_16071009\Semester6\drfi_matlab-master\randomforest-matlab\RF_Reg_C\src\mex_regressionRF_train.cpp(158): error C2664: 'mxArray mxCreateNumericMatrix_730(std::size_t,std::size_t,mxClassID,mxComplexity)': cannot convert argument 4 from 'int' to 'mxComplexity' C:\Users\DELL7810\Desktop\GargiSrivastava_16071009\Semester6\drfi_matlab-master\randomforest-matlab\RF_Reg_C\src\mex_regressionRF_train.cpp(158): note: Conversion to enumeration type requires an explicit cast (static_cast, C-style cast or function-style cast) C:\Users\DELL7810\Desktop\GargiSrivastava_16071009\Semester6\drfi_matlab-master\randomforest-matlab\RF_Reg_C\src\mex_regressionRF_train.cpp(163): error C2664: 'mxArray mxCreateNumericMatrix_730(std::size_t,std::size_t,mxClassID,mxComplexity)': cannot convert argument 4 from 'int' to 'mxComplexity' C:\Users\DELL7810\Desktop\GargiSrivastava_16071009\Semester6\drfi_matlab-master\randomforest-matlab\RF_Reg_C\src\mex_regressionRF_train.cpp(163): note: Conversion to enumeration type requires an explicit cast (static_cast, C-style cast or function-style cast) C:\Users\DELL7810\Desktop\GargiSrivastava_16071009\Semester6\drfi_matlab-master\randomforest-matlab\RF_Reg_C\src\mex_regressionRF_train.cpp(177): error C2664: 'mxArray mxCreateNumericMatrix_730(std::size_t,std::size_t,mxClassID,mxComplexity)': cannot convert argument 4 from 'int' to 'mxComplexity' C:\Users\DELL7810\Desktop\GargiSrivastava_16071009\Semester6\drfi_matlab-master\randomforest-matlab\RF_Reg_C\src\mex_regressionRF_train.cpp(177): note: Conversion to enumeration type requires an explicit cast (static_cast, C-style cast or function-style cast) C:\Users\DELL7810\Desktop\GargiSrivastava_16071009\Semester6\drfi_matlab-master\randomforest-matlab\RF_Reg_C\src\mex_regressionRF_train.cpp(180): error C2664: 'mxArray mxCreateNumericMatrix_730(std::size_t,std::size_t,mxClassID,mxComplexity)': cannot convert argument 4 from 'int' to 'mxComplexity' C:\Users\DELL7810\Desktop\GargiSrivastava_16071009\Semester6\drfi_matlab-master\randomforest-matlab\RF_Reg_C\src\mex_regressionRF_train.cpp(180): note: Conversion to enumeration type requires an explicit cast (static_cast, C-style cast or function-style cast) C:\Users\DELL7810\Desktop\GargiSrivastava_16071009\Semester6\drfi_matlab-master\randomforest-matlab\RF_Reg_C\src\mex_regressionRF_train.cpp(187): error C2664: 'mxArray mxCreateNumericMatrix_730(std::size_t,std::size_t,mxClassID,mxComplexity)': cannot convert argument 4 from 'int' to 'mxComplexity' C:\Users\DELL7810\Desktop\GargiSrivastava_16071009\Semester6\drfi_matlab-master\randomforest-matlab\RF_Reg_C\src\mex_regressionRF_train.cpp(187): note: Conversion to enumeration type requires an explicit cast (static_cast, C-style cast or function-style cast) C:\Users\DELL7810\Desktop\GargiSrivastava_16071009\Semester6\drfi_matlab-master\randomforest-matlab\RF_Reg_C\src\mex_regressionRF_train.cpp(193): error C2664: 'mxArray mxCreateNumericMatrix_730(std::size_t,std::size_t,mxClassID,mxComplexity)': cannot convert argument 4 from 'int' to 'mxComplexity' C:\Users\DELL7810\Desktop\GargiSrivastava_16071009\Semester6\drfi_matlab-master\randomforest-matlab\RF_Reg_C\src\mex_regressionRF_train.cpp(193): note: Conversion to enumeration type requires an explicit cast (static_cast, C-style cast or function-style cast) C:\Users\DELL7810\Desktop\GargiSrivastava_16071009\Semester6\drfi_matlab-master\randomforest-matlab\RF_Reg_C\src\mex_regressionRF_train.cpp(199): error C2664: 'mxArray mxCreateNumericMatrix_730(std::size_t,std::size_t,mxClassID,mxComplexity)': cannot convert argument 4 from 'int' to 'mxComplexity' C:\Users\DELL7810\Desktop\GargiSrivastava_16071009\Semester6\drfi_matlab-master\randomforest-matlab\RF_Reg_C\src\mex_regressionRF_train.cpp(199): note: Conversion to enumeration type requires an explicit cast (static_cast, C-style cast or function-style cast) C:\Users\DELL7810\Desktop\GargiSrivastava_16071009\Semester6\drfi_matlab-master\randomforest-matlab\RF_Reg_C\src\mex_regressionRF_train.cpp(205): error C2664: 'mxArray mxCreateNumericMatrix_730(std::size_t,std::size_t,mxClassID,mxComplexity)': cannot convert argument 4 from 'int' to 'mxComplexity' C:\Users\DELL7810\Desktop\GargiSrivastava_16071009\Semester6\drfi_matlab-master\randomforest-matlab\RF_Reg_C\src\mex_regressionRF_train.cpp(205): note: Conversion to enumeration type requires an explicit cast (static_cast, C-style cast or function-style cast) C:\Users\DELL7810\Desktop\GargiSrivastava_16071009\Semester6\drfi_matlab-master\randomforest-matlab\RF_Reg_C\src\mex_regressionRF_train.cpp(211): error C2664: 'mxArray mxCreateNumericMatrix_730(std::size_t,std::size_t,mxClassID,mxComplexity)': cannot convert argument 4 from 'int' to 'mxComplexity' C:\Users\DELL7810\Desktop\GargiSrivastava_16071009\Semester6\drfi_matlab-master\randomforest-matlab\RF_Reg_C\src\mex_regressionRF_train.cpp(211): note: Conversion to enumeration type requires an explicit cast (static_cast, C-style cast or function-style cast) C:\Users\DELL7810\Desktop\GargiSrivastava_16071009\Semester6\drfi_matlab-master\randomforest-matlab\RF_Reg_C\src\mex_regressionRF_train.cpp(217): error C2664: 'mxArray mxCreateNumericMatrix_730(std::size_t,std::size_t,mxClassID,mxComplexity)': cannot convert argument 4 from 'int' to 'mxComplexity' C:\Users\DELL7810\Desktop\GargiSrivastava_16071009\Semester6\drfi_matlab-master\randomforest-matlab\RF_Reg_C\src\mex_regressionRF_train.cpp(217): note: Conversion to enumeration type requires an explicit cast (static_cast, C-style cast or function-style cast) C:\Users\DELL7810\Desktop\GargiSrivastava_16071009\Semester6\drfi_matlab-master\randomforest-matlab\RF_Reg_C\src\mex_regressionRF_train.cpp(223): error C2664: 'mxArray mxCreateNumericMatrix_730(std::size_t,std::size_t,mxClassID,mxComplexity)': cannot convert argument 4 from 'int' to 'mxComplexity' C:\Users\DELL7810\Desktop\GargiSrivastava_16071009\Semester6\drfi_matlab-master\randomforest-matlab\RF_Reg_C\src\mex_regressionRF_train.cpp(223): note: Conversion to enumeration type requires an explicit cast (static_cast, C-style cast or function-style cast) C:\Users\DELL7810\Desktop\GargiSrivastava_16071009\Semester6\drfi_matlab-master\randomforest-matlab\RF_Reg_C\src\mex_regressionRF_train.cpp(227): error C2664: 'mxArray mxCreateNumericMatrix_730(std::size_t,std::size_t,mxClassID,mxComplexity)': cannot convert argument 4 from 'int' to 'mxComplexity' C:\Users\DELL7810\Desktop\GargiSrivastava_16071009\Semester6\drfi_matlab-master\randomforest-matlab\RF_Reg_C\src\mex_regressionRF_train.cpp(227): note: Conversion to enumeration type requires an explicit cast (static_cast, C-style cast or function-style cast) C:\Users\DELL7810\Desktop\GargiSrivastava_16071009\Semester6\drfi_matlab-master\randomforest-matlab\RF_Reg_C\src\mex_regressionRF_train.cpp(253): error C2664: 'mxArray mxCreateNumericMatrix_730(std::size_t,std::size_t,mxClassID,mxComplexity)': cannot convert argument 4 from 'int' to 'mxComplexity' C:\Users\DELL7810\Desktop\GargiSrivastava_16071009\Semester6\drfi_matlab-master\randomforest-matlab\RF_Reg_C\src\mex_regressionRF_train.cpp(253): note: Conversion to enumeration type requires an explicit cast (static_cast, C-style cast or function-style cast) C:\Users\DELL7810\Desktop\GargiSrivastava_16071009\Semester6\drfi_matlab-master\randomforest-matlab\RF_Reg_C\src\mex_regressionRF_train.cpp(258): error C2664: 'mxArray mxCreateNumericMatrix_730(std::size_t,std::size_t,mxClassID,mxComplexity)': cannot convert argument 4 from 'int' to 'mxComplexity' C:\Users\DELL7810\Desktop\GargiSrivastava_16071009\Semester6\drfi_matlab-master\randomforest-matlab\RF_Reg_C\src\mex_regressionRF_train.cpp(258): note: Conversion to enumeration type requires an explicit cast (static_cast, C-style cast or function-style cast) C:\Users\DELL7810\Desktop\GargiSrivastava_16071009\Semester6\drfi_matlab-master\randomforest-matlab\RF_Reg_C\src\mex_regressionRF_train.cpp(263): error C2664: 'mxArray mxCreateNumericMatrix_730(std::size_t,std::size_t,mxClassID,mxComplexity)': cannot convert argument 4 from 'int' to 'mxComplexity' C:\Users\DELL7810\Desktop\GargiSrivastava_16071009\Semester6\drfi_matlab-master\randomforest-matlab\RF_Reg_C\src\mex_regressionRF_train.cpp(263): note: Conversion to enumeration type requires an explicit cast (static_cast, C-style cast or function-style cast) C:\Users\DELL7810\Desktop\GargiSrivastava_16071009\Semester6\drfi_matlab-master\randomforest-matlab\RF_Reg_C\src\mex_regressionRF_train.cpp(266): error C2664: 'mxArray *mxCreateNumericMatrix_730(std::size_t,std::size_t,mxClassID,mxComplexity)': cannot convert argument 4 from 'int' to 'mxComplexity' C:\Users\DELL7810\Desktop\GargiSrivastava_16071009\Semester6\drfi_matlab-master\randomforest-matlab\RF_Reg_C\src\mex_regressionRF_train.cpp(266): note: Conversion to enumeration type requires an explicit cast (static_cast, C-style cast or function-style cast)
Error in compile (line 11) mex src/cokus.cpp src/reg_RF.cpp src/mex_regressionRF_train.cpp -DMATLAB -output mexRF_train