How to make mex file of C program in matlab

조회 수: 1 (최근 30일)
Mohammad Rafi Lone
Mohammad Rafi Lone 2012년 4월 24일
I have to run a matlab code namely "huff2mat.m" but it uses a C file namely "unravel.c". It also asks me to make a mex file of it. How can i use the file "unravel.c" in matlab.

채택된 답변

Junaid
Junaid 2012년 4월 24일
if it is mex file, its mean C code for matlab. then simply compile it by this command in matlab editor.
mex unravel.c;
then you can call unravel as function in matlab.
  댓글 수: 1
Jan
Jan 2012년 4월 24일
And if you didn't do it before: "mex -setup". This setup requires and installed compiler, but this is perhaps another question.

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Write C Functions Callable from MATLAB (MEX Files)에 대해 자세히 알아보기

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by