mathlink

(MathLink) Correct handling of Messages generated by slave kernel

生来就可爱ヽ(ⅴ<●) 提交于 2019-12-01 00:03:29
When working through MathLink with slave kernel I have a problem with correct parsing TextPacket s. In particular when such packet corresponds to a Message generated by the slave kernel I do not understand how to handle it correctly at all. I need such Messages to be printed in the evaluation notebook as if they were generated by master kernel (but with some mark to make clear that it comes from the slave). And I need to separate TextPacket s corresponding to Message s from just to Print[] commands. The latter I need to parse correctly too, printing them in the evaluation notebook with a

(MathLink) Correct handling of Messages generated by slave kernel

怎甘沉沦 提交于 2019-11-30 18:42:33
问题 When working through MathLink with slave kernel I have a problem with correct parsing TextPacket s. In particular when such packet corresponds to a Message generated by the slave kernel I do not understand how to handle it correctly at all. I need such Messages to be printed in the evaluation notebook as if they were generated by master kernel (but with some mark to make clear that it comes from the slave). And I need to separate TextPacket s corresponding to Message s from just to Print[]

Install MathLink program with arbitrary PATH environment

时间秒杀一切 提交于 2019-11-29 10:56:09
Is it possible to use Install[] to start a MathLink program with a custom PATH environment variable? I am trying to use mEngine to connect Mathematica to MATLAB on Windows. It only works if mEngine.exe is launched when the PATH environment variable includes the path to the MATLAB libraries. Is it possible to modify the PATH for launching this program only , without needing to modify the system path? Or is there another way to launch mEngine.exe ? @acl's solution to wrap mEngine.exe in a batch file, and temporarily modify the PATH from there, works correctly: I used this as the contents of

Install MathLink program with arbitrary PATH environment

风流意气都作罢 提交于 2019-11-28 04:18:56
问题 Is it possible to use Install[] to start a MathLink program with a custom PATH environment variable? I am trying to use mEngine to connect Mathematica to MATLAB on Windows. It only works if mEngine.exe is launched when the PATH environment variable includes the path to the MATLAB libraries. Is it possible to modify the PATH for launching this program only , without needing to modify the system path? Or is there another way to launch mEngine.exe ? 回答1: @acl's solution to wrap mEngine.exe in a

Executing code in v.5.2 kernel from within v.7.01 session through MathLink

浪子不回头ぞ 提交于 2019-11-27 14:30:46
I have Mathematica 7.01 and Mathematica 5.2 installed on the same machine. I wish to be able to evaluate code in the v.5.2 kernel from within Mathematica 7.01 session. I mean that running Mathematica 7.0.1 standard session I wish to have a command like kernel5Evaluate to evaluate some code in the 5.2 kernel and return the result into the 7.01 kernel and linked 7.01 FrontEnd notebook in such a way as this code would be executed in the 7.01 kernel. For example (in the standard Mathematica v.7.01 session): In[1]:= solutionFrom5 = kernel5Evaluate[NDSolve[{(y^\[Prime])[x]==y[x],y[1]==2},y,{x,0,3}]]

Executing code in v.5.2 kernel from within v.7.01 session through MathLink

喜你入骨 提交于 2019-11-26 16:46:47
问题 I have Mathematica 7.01 and Mathematica 5.2 installed on the same machine. I wish to be able to evaluate code in the v.5.2 kernel from within Mathematica 7.01 session. I mean that running Mathematica 7.0.1 standard session I wish to have a command like kernel5Evaluate to evaluate some code in the 5.2 kernel and return the result into the 7.01 kernel and linked 7.01 FrontEnd notebook in such a way as this code would be executed in the 7.01 kernel. For example (in the standard Mathematica v.7