Talk About Network



Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Programming > Forth > Re: The Promise...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 3 of 3 Topic 3961 of 4065
Post > Topic >>

Re: The Promise of Forth

by mhx@[EMAIL PROTECTED] (Marcel Hendrix) Mar 24, 2008 at 09:46 AM

Albert van der Horst <albert@[EMAIL PROTECTED]
> writes: Re: Matlab
executes Forth commands

> In article <17903932203559@[EMAIL PROTECTED]
>, Marcel Hendrix <mhx@[EMAIL PROTECTED]
>
wrote:
>>Here is small utility to let Matlab execute Forth
>>commands. It assumes you have the words MAT@[EMAIL PROTECTED]
 and MAT!
>>to access Matlab matrices from your Forth interpreter
>>(Forth must start Matlab in such a way that both programs
>>have a console window). The array answer{ (on the Forth
>>side) is used to quickly get numerical results to Matlab.

> I'm unclear about how the communication works.
> Do MAT@[EMAIL PROTECTED]
 and MAT! access some sort of shared memory between the Forth
> and Matlab?

That's the way I do it, but you might try DDE (on Windows). I have
a DDE interface to Matlab in iForth, and I think SwiftForth and VFX 
have one too. (It's slightly more challenging than box4.)

The interface spec. of these two words is:

S" FORTHCMD" m2f{  MAT@[EMAIL PROTECTED]
 \ copy FORTHCMD matrix from Matlab to FSL-style
Forth dmatrix
newcmd{ S" NEWCMD" MAT! \ copy FSL-style dmatrix to Matlab NEWCMD (must
exist)

Of course, you also want S" aap" MEXECUTE (let Matlab execute Forth
command),
but I didn't use that in the posting.

-marcel




 3 Posts in Topic:
Matlab executes Forth commands
mhx@[EMAIL PROTECTED] (M  2008-03-23 16:33:06 
Re: Matlab executes Forth commands
Albert van der Horst <  2008-03-24 03:10:54 
Re: The Promise of Forth
mhx@[EMAIL PROTECTED] (M  2008-03-24 09:46:04 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Sat May 17 3:49:49 CDT 2008.