MATLAB Answers

Returning status of operation using mex

조회 수: 2(최근 30일)
Jw
Jw 16 Dec 2011
After i call to the mex function i written to do fopen, fred and fclose, how do i return the status to my mat file to check whether the file has been read or opened?

  댓글 수: 0

로그인 to comment.

답변(1개)

Chirag Gupta
Chirag Gupta 16 Dec 2011
mex functions can return outputs:
void mexFunction(int nlhs, mxArray *plhs[], int nrhs,
const mxArray *prhs[]);
The nlhs : number of left hand arguments and plhs are the arguments you wish to return.
So you could return the status of the MAT file in plhs. You would call this function in MATLAB:
status = NameOfYourMexFunction(inputs);

  댓글 수: 0

로그인 to comment.

이 질문에 답변하려면 로그인을(를) 수행하십시오.

태그


Translated by