calling c file from m file

조회 수: 3 (최근 30일)
sree
sree 2014년 1월 31일
댓글: SOMASEKAR 2020년 4월 27일
I am beginner in matlab ... i downloaded nsct toolbox but i got a problem ...in nsct toolbox one prg nssfbdec.m calling function in zconv2.c file...
i got error like this
??? Undefined function or method 'zconv2' for input arguments of type 'double'.
Error in ==> nssfbdec at 61 y1 = zconv2D_O( x, f1, mup );
Error in ==> nsdfbdec at 103 [y{1}, y{2}] = nssfbdec( x1, k1, k2, q1 ) ;
Error in ==> nsctdec at 112 xhi_dir = nsdfbdec(xhi, filters, levels(nIndex-1));
Error in ==> nsct at 32 yA=nsctdec(A,nlevs,dfilt,pfilt);
can any1 help me to solve this...lot of thanks in advance....

채택된 답변

Friedrich
Friedrich 2014년 1월 31일
편집: Friedrich 2014년 1월 31일
Hi,
have you taken a look at the readme contained in that TB? Because it tells you what to do:
Note: There are three mex file (zconv2.c, zconv2S.c, atrousc.c) in the nonsubsampled Contourlet Toolbox that might need to be recompiled.
This can be done by typing from the Matlab command window
>> mex zconv2D_O.c
And for mex'ing files you need to have installed a supported compiler.
  댓글 수: 1
sree
sree 2014년 1월 31일
thank u so much..

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

추가 답변 (1개)

Anju Gopinath
Anju Gopinath 2020년 2월 14일
1) I couldn't find zconv2D_O.c anywhere in the source code so ," mex zconv2D_O.c" didn't work. I found an alternative solution:
I downlded the source code from this link:
[Click 'Download source code' towards the bottom of the below webpage.]
2) Then I saved atrousc.c and zconv2.c in the folder where I am working.
I compiled both files with commands mex atrousc.c and mex zconv2.c
3) for the mex command to work, you need to install gcc 6.3.x .. the instructions are given in this link:
Notes:
- I installed gcc 8 and it worked for me (although matlab gives a warning that mex command works only with gcc 6.3)
- Before finding the freesourcecode.net link, I came across this link which has the source code for zconv2.m
so I copied this into my project folder so the initial error was resolved. But once this error got solved, I got the error "Undefined function or method 'atrousc'. Both the errors can be resolved using steps 1,2,3 above.
  댓글 수: 1
SOMASEKAR
SOMASEKAR 2020년 4월 27일
http://freesourcecode.net/matlabprojects/70812/nonsubsampled-contourlet-toolbox-in-matlab#.XkYDqzN7k8o
I am not able to download the source code . Plz help me in this regard

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

카테고리

Help CenterFile Exchange에서 Downloads에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by