Simple MathLink question
- To: mathgroup at smc.vnet.net
- Subject: [mg15076] Simple MathLink question
- From: Wilson Figueroa <wfigueroa at GI.COM>
- Date: Thu, 10 Dec 1998 03:13:07 -0500
- References: <7257mf$89d@smc.vnet.net> <72ts50$ipp@smc.vnet.net>
- Sender: owner-wri-mathgroup at wolfram.com
Hi all, I have never written anything that uses MathLink and was wondering if someone who has done so could share it. I have Mathematica 3.0.1 and use MicroSoft Visual C++ 6.0. I will be teching a course which uses Mathematica for demonstration and would like to include such an example. Any ideas? Also, has anyone done any engineering type applications with Mathematica in areas of signal processing, image analysis or general engineering and science applications that they would be willing to share? Sorry for the long wishlist. Wilson flip at aznet.net Chikara MIYAJI wrote: > > In article <7257mf$89d at smc.vnet.net>, Jim McGuire <jimm at opticalres.com> > wrote: > > It seems to me buffering problem, because MLReady doesn't flush the > outgoing data. > > Add MLFlush(stdlink); after MLEndPacket. > > Your code: > >MLPutFunction(stdlink,"EvaluatePacket",1); > > MLPutFunction(stdlink,"Get",1); > > MLPutString(stdlink,"\"D:\\jimm\\svgcn018\\MathLink_USERSUR.mx\""); > >MLEndPacket(stdlink); > >printf("MLReady = %d\n",MLReady(stdlink)); > > Modified version: > MLPutFunction(stdlink,"EvaluatePacket",1); > MLPutFunction(stdlink,"Get",1); > MLPutString(stdlink,"\"D:\\jimm\\svgcn018\\MathLink_USERSUR.mx\""); > MLEndPacket(stdlink); > MLFlush(stdlink); > printf("MLReady = %d\n",MLReady(stdlink));