calling c file from m file

6 visualizaciones (últimos 30 días)
sree
sree el 31 de En. de 2014
Comentada: SOMASEKAR el 27 de Abr. de 2020
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....

Respuesta aceptada

Friedrich
Friedrich el 31 de En. de 2014
Editada: Friedrich el 31 de En. de 2014
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.

Más respuestas (1)

Anju Gopinath
Anju Gopinath el 14 de Feb. de 2020
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 comentario
SOMASEKAR
SOMASEKAR el 27 de Abr. de 2020
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

Iniciar sesión para comentar.

Categorías

Más información sobre Downloads en Help Center y File Exchange.

Community Treasure Hunt

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

Start Hunting!

Translated by