FW: Polhemus

Tobias tobias.fw at gmail.com
Mon May 13 10:19:21 UTC 2013


Dear Paul,

thanks a lot for this code. It works very well. There are some issued I 
have, though.

>From your script I understand that there are at least two ways of getting 
data from Matlab to E-Prime: Execute and getfullmatrix. Are there other 
ways?
Also, it seems that there is no way of transmitting a variable from E-Prime 
to Matlab, only string values such as "b = a + a".
Of course I could always use sth like 

Result = MatLab.Execute(CStr(eprimeVar))

If I wanted to get the variable eprimeVar from E-Prime to Matlab. But maybe 
there is an easier way?

Best,
Tobias



Am Dienstag, 7. Mai 2013 17:01:32 UTC+2 schrieb Paul Groot:
>
> I don't think eprime requires a special plugin like presentation, because 
> matlab can also be started as a so called COM server:
>
> Dim MatLab As Object
> Dim Result As String
> Dim MReal(1, 3) As Double
> Dim MImag(1, 3) As Double
>
> Set MatLab = CreateObject("Matlab.Application")
>
> 'Executing other MATLAB commands
> Result = MatLab.Execute("surf(peaks)")
> Debug.Print Result 
>
> Result = MatLab.Execute("a = [1 2 3 4; 5 6 7 8]")
> Debug.Print Result 
>
> Result = MatLab.Execute("b = a + a ")
> Debug.Print Result 
>
> 'Bring matrix b into VB program
> MatLab.GetFullMatrix "b", "base", MReal, MImag
>
> Debug.Print MReal(1,0)
> Debug.Print MReal(1,1)
> Debug.Print MReal(1,2)
> Debug.Print MReal(1,3)
>
>
> The above will print the following to the Debug window:
>
> a =
>
>      1     2     3     4
>      5     6     7     8
>
>
>
> b =
>
>      2     4     6     8
>     10    12    14    16
>
>
> 10
> 12
> 14
> 16
>
> The matlab figure window won't be visible though...
>
> Best,
> Paul
>
>
>
> On 7 May 2013 16:26, David McFarlane <mcfa... at msu.edu <javascript:>>wrote:
>
>> Can you start your MATLAB script from a command line?  If so, then you 
>> might try using the E-Basic "Shell()" function, see that topic in the 
>> E-Basic Help facility.  For a user example of this, see 
>> http://support.pstnet.com/**forum/Topic1338-8-2.aspx<http://support.pstnet.com/forum/Topic1338-8-2.aspx>.  This still leaves a lot to be desired, and beyond that I have no idea.
>>
>> -----
>> David McFarlane
>> E-Prime training online:  http://psychology.msu.edu/**
>> Workshops_Courses/eprime.aspx<http://psychology.msu.edu/Workshops_Courses/eprime.aspx>
>> Twitter:  @EPrimeMaster (https://twitter.com/**EPrimeMaster<https://twitter.com/EPrimeMaster>
>> )
>>
>> /----
>> Stock reminder:  1) I do not work for PST.  2) PST's trained staff take 
>> any and all questions at http://support.pstnet.com/e%**
>> 2Dprime/support/login.asp<http://support.pstnet.com/e%2Dprime/support/login.asp>, and they strive to respond to all requests in 24-48 hours, so make full 
>> use of it.  3) In addition, PST offers several instructional videos on 
>> their YouTube channel (http://www.youtube.com/user/**PSTNET<http://www.youtube.com/user/PSTNET>).  4) If you do get an answer from PST staff, please extend the courtesy 
>> of posting their reply back here for the sake of others.
>> \----
>>
>>
>>
>> At 5/7/2013 10:08 AM Tuesday, Cognitology wrote:
>>
>>> Hi,
>>> Never heard of a way to interface matlab from E-Prime, I'd be interested 
>>> if anyone would have a way. Of course, you could compile from within matlab 
>>> and try to go from there, but I suspect the amount of effort would really 
>>> not be worth it. You could, of course, just forego e-prime and try 
>>> Psychtoolbox.
>>> Best,
>>> Michiel
>>>
>>> From: <mailto:e-p... at googlegroups.**com <javascript:>>
>>> e-p... at googlegroups.com <javascript:> [mailto:e-p... at googlegroups.**com<javascript:>] 
>>> On Behalf Of Tobias
>>>
>>> Sent: 7. May 2013 13:31
>>> To: <mailto:e-p... at googlegroups.**com <javascript:>>
>>> e-p... at googlegroups.com <javascript:>
>>>
>>> Subject: Re: Polhemus
>>>
>>> To be more precisely: What I need to do is to start a matlab script from 
>>> E-Prime.
>>> "Presentation" has some plugin to connect with Matlab, but E-Prime seems 
>>> not to have that. But there may be another way...
>>>
>>> Am Montag, 6. Mai 2013 15:39:19 UTC+2 schrieb Tobias:
>>> Dear all,
>>>
>>> Does anyone have experience with running Polhemus Liberty (the motion 
>>> tracking system) with E-Prime?
>>>
>>> Best,
>>> Tobias
>>>
>>
>> -- 
>> You received this message because you are subscribed to the Google Groups 
>> "E-Prime" group.
>> To unsubscribe from this group and stop receiving emails from it, send an 
>> email to e-prime+u...@**googlegroups.com <javascript:>.
>> To post to this group, send email to e-p... at googlegroups.com<javascript:>
>> .
>> For more options, visit https://groups.google.com/**groups/opt_out<https://groups.google.com/groups/opt_out>
>> .
>>
>>
>>
>

-- 
You received this message because you are subscribed to the Google Groups "E-Prime" group.
To unsubscribe from this group and stop receiving emails from it, send an email to e-prime+unsubscribe at googlegroups.com.
To post to this group, send email to e-prime at googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msg/e-prime/-/kIUzT6nN__AJ.
For more options, visit https://groups.google.com/groups/opt_out.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listserv.linguistlist.org/pipermail/eprime/attachments/20130513/459e4f72/attachment.htm>


More information about the Eprime mailing list