MATLAB on MAC OS X

I installed CUDA 2.2 on my macbook pro. Based on the QuickStart guide, “deviceQuery”, “bandwidthTest”, and “particles” are working fine. Then, I downloaded MATLAB plug-in from the website ( http://developer.nvidia.com/object/matlab_cuda.html ) and it did not work well.
Specifically, when I ran unix(‘make’), following error appeared.

unix(‘make’);
./nvmex -f nvopts.sh Szeta.cu -I/usr/local/cuda/include -L/usr/local/cuda/lib -lcufft -Wl,-rpath,/usr/local/cuda/lib
./nvmex: line 931: nvcc: command not found

mex: compile of ‘Szeta.cu’ failed.

I tried adding -lcuda and -lcudart as well, but it didn’t work. How can I solve this problem?

p.s. I added path properly, and ‘nvcc -V’ in a terminal also worked.

As i come up with the same question and i solved it in this way:
in your nvopts.sh file rewrite the
RPATH="-Wl,-rpath-link,$TMW_ROOT/bin/$Arch"
CC=‘nvcc’
CFLAGS=’-O3 -Xcompiler “-fPIC -D_GNU_SOURCE -pthread -fexceptions -m32”’
CLIBS="$RPATH $MLIBS -lm -lstdc++"
COPTIMFLAGS=’-Xcompiler “-O3 -funroll-loops -msse2 -DNDEBUG”’
CDEBUGFLAGS=’-g’
to
RPATH="-Wl,-rpath-link,$TMW_ROOT/bin/$Arch"
CC=’/usr/local/cuda/bin/nvcc’
CFLAGS=’-O3 -Xcompiler “-fPIC -D_GNU_SOURCE -pthread -fexceptions -m32”’
CLIBS="$RPATH $MLIBS -lm -lstdc++"
COPTIMFLAGS=’-Xcompiler “-O3 -funroll-loops -msse2 -DNDEBUG”’
CDEBUGFLAGS=’-g’
then i works well!