1. 程式人生 > >關於MATLAB轉C++程式碼(二)

關於MATLAB轉C++程式碼(二)

有一些遇到過的問錯誤提示

一、“The left-hand side has been constrained to be non-complex, but the right-hand side is complex. To correct this problem, make the right-hand side real using the function REAL, or change the initial assignment to the left-hand side variable to be a complex value using the COMPLEX function.”

MATLAB裡面的型別我也不太明白,大概是複數和實數不能互轉,我都把他們用函式real()轉換成了實數,如程式碼中註釋的部。

2、“Undefined function or variable 'sparse'.”

關於稀疏矩陣的,居然找到一大堆sparse.m,每個都設斷點,居然沒有一個是,無奈只好自己寫了,運氣好能用

3、生成一堆標頭檔案和原始檔,在libwe檔案中,匯入VS中,注意stdafx.h