[問題] 用vc呼叫matlab
程式compiler已成功 不過run time會錯
我有問題在這一段相關的部分:
matlab code 是-------------------------------------------------------
fid=fopen('keyframe\\script.txt','w');
coding_frame=[26 7 7 7 1 5 2 5 2 6 5 6 2 0 1 6 0 1 2 3 1 6 2 4 2 7 7];
fprintf(fid,'%d ',coding_frame);
fprintf(fid,'\r\n');
fclose(fid);
----------------------------------------------------------------------
vc2005 code-------------------------------------------------------------
#include "matlab_code.h"
void CKeyFrameAnimaitonDlg::OnCbnSelendcancelVoicefilecombo()
{
UpdateData(true);
~
matlab_codeInitialize();
mxArray* score;
matlab_code(1,&score);
matlab_codeTerminate();
} <===呼叫堆疊後 停在這
-------------------------------------------------------------------------
問題如下:
於 0x7c812afb 的 KeyFrameAnimaiton.exe 中發生未處理的例外狀況: Microsoft C++
在記憶體位置 0x0012cd18,發生例外狀況: MathWorks::System::SimpleException
可是 vc有產生出 matlab_code 裡面要的.txt txt檔裡面的內容也沒錯
用matlab 去跑也可以跑出正確的結果 (沒有錯誤訊息)
請問我該如何去修正??? 謝謝
--
※ 發信站: 批踢踢實業坊(ptt.cc)
◆ From: 134.208.3.112
※ 編輯: catshadow 來自: 134.208.3.112 (04/21 15:22)