Ò׽ؽØͼÈí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö160KB

entry point to c/c++ or Fortran MEX file

http://www.mathworks.com/access/helpdesk/help/techdoc/apiref/mexfunction.html
mexFunction (C and Fortran) -
Entry point to C/C++ or Fortran MEX-file
C Syntax
#include "mex.h"
void mexFunction(int nlhs, mxArray *plhs[], int nrhs,
const mxArray *prhs[]);
Fortran
Syntax
subroutine mexFunction(nlhs, plhs, nrhs, prhs)
integer*4 nlhs, nrhs
mwPointer plhs(*), prhs(*)
Arguments
nlhs
Number
of expected output mxArray
s
plhs
Array
of pointers to the expected output mxArray
s
nrhs
Number
of input mxArray
s
prhs
Array of pointers to the
input mxArray
s.
Do not modify any prhs
values in your MEX-file.
Changing the data in these read-only mxArray
s can
produce undesired side effects.
Description
mexFunction
is not a routine you call.
Rather, mexFunction
is the name of the gateway
function in C (subroutine in Fortran) which every MEX-file requires.
When you invoke a MEX-function, MATLAB software finds and loads
the corresponding MEX-file of the same name. MATLAB then searches
for a symbol named mexFunction
within the MEX-file.
If it finds one, it calls the MEX-function using the address of the mexFunction
symbol. MATLAB displays
an error message if it cannot find a routine named mexFunction

inside
the MEX-file.
When you invoke a MEX-file, MATLAB automatically
seeds nlhs
, plhs
, nrhs
,
and prhs
with the caller's information. In the
syntax of the MATLAB language, functions have the general form:
[a,b,c,...] = fun(d,e,f,...)
where
the ...
denotes more items of the same
format. The a,b,c...
are left-hand side arguments,
and the d,e,f...
are right-hand side arguments.
The arguments nlhs
and nrhs
contain
the number of left-hand side and right-hand side arguments,
respectively. prhs
is
an array of mxArray
pointers whose length is nrhs
. plhs
is
an array whose length is nlhs
, where your function
must set pointers for the returned left-hand side mxArray
s.
Examples
See t


Ïà¹ØÎĵµ£º

LinuxϵÄC±à³Ìʵս֮Îļþϵͳ±à³Ì

ÎÄÕÂÀ´Ô´£ºhttp://dev.yesky.com/468/7601968.shtml
2007-10-12 11:01×÷ÕߣºËᦻª³ö´¦£ºÌ켫ÍøÈí¼þƵµÀÔðÈα༭£º·½ÖÛ
1.LinuxÎļþϵͳ
¡¡¡¡LinuxÖ§³Ö¶àÖÖÎļþϵͳ£¬Èçext¡¢ext2¡¢minix¡¢iso9660¡¢msdos¡¢fat¡¢vfat¡¢nfsµÈ¡£ÔÚÕâЩ¾ßÌåÎļþϵͳµÄÉϲ㣬LinuxÌṩÁËÐéÄâÎļþϵͳ£¨VFS£©À´Í³Ò»ËüÃǵÄÐÐΪ£¬ÐéÄâÎļþϵͳΪ ......

LinuxϵÄC±à³ÌÈëÃÅÖ®¡°Ï̡߳±¿ØÖÆÓë¡°Ï̡߳±Í¨Ðűà³Ì

±¾ÎÄÀ´×Ô:Linux½Ì³Ì -- http://doc.linuxpk.com/53295.html
ÈçÓв»Ã÷°×Ö®´¦£¬»¶Ó­²Î¼ÓÉçÇøÌÖÂÛ
1.Linux“Ï߳̔
 ±ÊÕßÔø¾­ÔÚ¡¶»ùÓÚǶÈëʽ²Ù×÷ϵͳVxWorksµÄ¶àÈÎÎñ²¢·¢³ÌÐòÉè¼Æ¡·£¨¡¶Èí¼þ±¨¡·2006ÄêµÚ5~12ÆÚ£©ÖÐÏêϸÐðÊöÁ˽ø³ÌºÍÏ̵߳ÄÇø±ð£¬²¢Ôø¾­ËµÃ÷LinuxÊÇÒ»ÖÖ“¶à½ø³Ìµ¥Ï߳̔µÄ²Ù×÷ϵͳ¡£ ......

GCC G++ C C++µÄÇø±ð

gcc ÊÇcµÄ±àÒëÆ÷£¬g++ÊÇc++µÄ±àÒëÆ÷¡£ccÒ»°ãÊÇÒ»¸ö·ûºÅÁ¬½Ó£¬Ö¸Ïògcc¡£ 
CCÒ»°ãÊÇmakefileÀïÃæµÄÒ»¸öÃû×Ö£¬¾ßÌåÊÇʲô¸ù¾Ýʵ¼ÊÇé¿ö¾ö¶¨¡£ 
gccºÍg++¶¼ÊÇGNU(×éÖ¯)µÄÒ»¸ö±àÒëÆ÷¡£ 
ÎóÇøÒ»:gccÖ»ÄܱàÒëc´úÂë,g++Ö»ÄܱàÒëc++´úÂë 
Á½Õ߶¼¿ÉÒÔ£¬µ«ÊÇÇë×¢Ò⣺ 
1,ºó׺Ϊ.cµÄ£¬gcc°ÑËüµ±×÷ÊÇC³ÌÐò£ ......

ÓÃEclipse´î½¨C/C++¿ª·¢Æ½Ì¨

̸µ½EclipseÕâ¸ö¿ªÔ´IDE£¬´ó¼Ò¶¼»áDZÒâʶµØ°ÑËüºÍJAVA¿ª·¢ÁªÏµÆðÀ´¡£Ã»´í£¬EclipseÓÃÓÚJAVA applicationµÄ¿ª·¢ÊÇÄ¿Ç°µÄÖ÷Á÷£¬¶øÇÒËü±¾ÉíÒ²ÊÇÐèÒªJRE²ÅÄÜÔËÐеģ¬Òò¶øÎÞÂÛÔõô¿´Eclipse¶¼ÓëJAVAÓÐÃܲ»¿É·ÖµÄÁªÏµ¡£ µ«Êµ¼ÊÉÏEclipseÖ»ÊÇÒ»¸ö¿ª·¢»·¾³£¬Ò»¸öΪ³ÌÐòÔ±ÌṩµÄ¿ò¼Ü£¬ÓëÓïÑÔ²¢ÎÞÖ±½ÓÁªÏµ¡£×Ô´Ó2001ÄêIBM½«Eclipse¾èÏ ......

linux c socket ¿ª·¢Óë±àÒëʵÀý

ÕâƪÈÕÖ¾»¹ÊÇÏÈ´ÓÒ»¸öÄܹ»ÔËÐÐÆðÀ´µÄÀý×Ó³ö·¢£¬Ò»µ©ÄÜ˳ÀûµÄ¿´µ½³ÌÐòµÄ³É¹¦ÔËÐУ¬ÄÇô½ÓÏÂÀ´µÄʼþÎÒÏëÓ¦¸ÃÊÇÎÊΪʲôÁË£¿ËƺõÕâÑù¸ü¼ÓÈÝÒ×Àí½âºÍÕÆÎÕ¡£
¶ÔÓÚsocket³ÌÐòµÄ¸ÅÄîÕâÀï¾Í²»¶àдÁË£¬µ«ÎÒÏàÐÅ£¬Èç¹ûÄÜ¿´ÍêÕâÕûƪÎÄÕ£¬ÎÒÏàÐŲ»»áÔÙÓÐÕâÑùµÄÒÉÎʵġ£
ÏÂÃ潫±àдһ¸öc/s½á¹¹µÄ³ÌÐò£¬Ö÷Òª¹¦ÄÜÊÇclient½«Ïòserver·¢Ë ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ