<div dir="ltr"><div>I don't know anything about polhemus or the datacapture function, but it sounds like this function generates a lot of output in the matlab command window. You can capature this into a dummy variable by using evalc:<br>
<br>x = MatLab.Execute("dummy=evalc('dataCapture;');")<br><br><br></div><div>Mind the single and double quotes)<br><br></div><div>best<br></div><div>Paul<br></div></div><div class="gmail_extra"><br><br><div class="gmail_quote">
On 25 May 2013 19:53, Tobias <span dir="ltr"><<a href="mailto:tobias.fw@gmail.com" target="_blank">tobias.fw@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Thanks for all the help.<br><br>I have successfully implemented Polhemus in E-Prime.<br><br>There is only one problem left: When a lot of data is recorded, which is not unusual for longer movements of particpants, the string becomes too long for E-Prime.<br>
<br>I use this function:<br><br>x = MatLab.Execute("dataCapture;")<br><br>For longer recordings which makes data rather large the following error occurs:<br>"Error number 14: Out of string space"<br><br>
The thing is, I don't really need any of the recorded data for E-Prime. But I can't find a way to not have E-Prime import the data into the variable x.<br>Is there a way of executing MatLab function without forwarding data to Matlab?<br>
<br>Best,<br>Tobias<br><br>Am Montag, 13. Mai 2013 18:23:54 UTC+2 schrieb Paul Groot:<blockquote class="gmail_quote" style="margin:0;margin-left:0.8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="im"><div dir="ltr">
<div><div><div>Hi Tobias,<br><br>More detailed information about matlab's COM interface can be found here:<br><a href="http://www.mathworks.nl/help/matlab/call-matlab-com-automation-server.html" target="_blank">http://www.mathworks.nl/help/<u></u>matlab/call-matlab-com-<u></u>automation-server.html</a><br>

<br></div>There are a few functions available to pass variables, character array's, matrices and workspaces between the two applications, without the need to convert strings. The execute command should be used to execute scripts; not for passing variables (although you can do this off course). Large objects (like bitmap images) could also be passed by using external files (i.e. only passing the name of the created file).<br>

<br></div>Best<br></div>Paul<br><div><div><div><br></div></div></div></div></div><div><br><br><div class="gmail_quote"><div><div class="h5">On 13 May 2013 12:19, Tobias <span dir="ltr"><<a>tobi...@gmail.com</a>></span> wrote:<br>

</div></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div class="h5">Dear Paul,<br><br>thanks a lot for this code. It works very well. There are some issued I have, though.<br>
<br>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?<br>
Also, it seems that there is no way of transmitting a variable from E-Prime to Matlab, only string values such as "<span style="font-family:courier new,monospace">b = a + a</span>".<br>Of course I could always use sth like <br>

<span style="font-family:courier new,monospace"><br>Result = MatLab.Execute(CStr(eprimeVar)<u></u>)<br><br>If I wanted to get the variable eprimeVar from E-Prime to Matlab. But maybe there is an easier way?<br><br>Best,<br>
Tobias<br>
<br><br><br></span>Am Dienstag, 7. Mai 2013 17:01:32 UTC+2 schrieb Paul Groot:<blockquote class="gmail_quote" style="margin:0;margin-left:0.8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div><div dir="ltr">
<div><div>I don't think eprime requires a special plugin like presentation, because matlab can also be started as a so called COM server:<br><br><span style="font-family:courier new,monospace">Dim MatLab As Object<br>


Dim Result As String<br>Dim MReal(1, 3) As Double<br>Dim MImag(1, 3) As Double<br><br>Set MatLab = CreateObject("Matlab.<u></u>Applicati<u></u>on")<br><br>'Executing other MATLAB commands<br>Result = MatLab.Execute("surf(peaks)")<br>


Debug.Print Result <br><br>Result = MatLab.Execute("a = [1 2 3 4; 5 6 7 8]")<br>Debug.Print Result <br><br>Result = MatLab.Execute("b = a + a ")<br>Debug.Print Result <br><br>'Bring matrix b into VB program<br>


MatLab.GetFullMatrix "b", "base", MReal, MImag<br><br>Debug.Print MReal(1,0)<br>Debug.Print MReal(1,1)<br>Debug.Print MReal(1,2)<br>Debug.Print MReal(1,3)</span><br><br><br></div><div>The above will print the following to the Debug window:<br>


<br><span style="font-family:courier new,monospace">a =<br><br>     1     2     3     4<br>     5     6     7     8<br><br><br><br>b =<br><br>     2     4     6     8<br>    10    12    14    16<br><br><br>10<br>12<br>14<br>


16<br></span><br></div><div>The matlab figure window won't be visible though...<br><br></div>Best,<br></div>Paul<br><div><div><br></div></div></div></div></div><div><br><br><div class="gmail_quote"><div>On 7 May 2013 16:26, David McFarlane <span dir="ltr"><<a>mcfa...@msu.edu</a>></span> wrote:<br>


</div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div>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 <a href="http://support.pstnet.com/forum/Topic1338-8-2.aspx" target="_blank">http://support.pstnet.com/<u></u>foru<u></u><u></u>m/Topic1338-8-2.aspx</a> .  This still leaves a lot to be desired, and beyond that I have no idea.<br>



<br>
-----<br>
David McFarlane<br>
E-Prime training online:  <a href="http://psychology.msu.edu/Workshops_Courses/eprime.aspx" target="_blank">http://psychology.msu.edu/<u></u>Wor<u></u><u></u>kshops_Courses/eprime.aspx</a><br>
Twitter:  @EPrimeMaster (<a href="https://twitter.com/EPrimeMaster" target="_blank">https://twitter.com/<u></u>EPrimeMas<u></u><u></u>ter</a>)<br>
<br>
/----<br>
Stock reminder:  1) I do not work for PST.  2) PST's trained staff take any and all questions at <a href="http://support.pstnet.com/e%2Dprime/support/login.asp" target="_blank">http://support.pstnet.com/e%<u></u>2D<u></u><u></u>prime/support/login.asp</a> , 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 (<a href="http://www.youtube.com/user/PSTNET" target="_blank">http://www.youtube.com/user/<u></u>P<u></u><u></u>STNET</a> ).  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.<br>



\----<div><br>
<br>
<br>
At 5/7/2013 10:08 AM Tuesday, Cognitology wrote:<br>
</div></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div>
Hi,<br>
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.<br>



Best,<br>
Michiel<br>
<br></div></div>
From: <mailto:<a>e-p...@googlegroups.<u></u>c<u></u>o<u></u>m</a>><a>e-p...@googlegroups.com</a> [mailto:<a>e-p...@googlegroups.<u></u>c<u></u>o<u></u>m</a>] On Behalf Of Tobias<div><div>
<br>
Sent: 7. May 2013 13:31<br></div></div>
To: <mailto:<a>e-p...@googlegroups.<u></u>c<u></u>o<u></u>m</a>><a>e-p...@googlegroups.com</a><div><div><br>
Subject: Re: Polhemus<br>
<br>
To be more precisely: What I need to do is to start a matlab script from E-Prime.<br>
"Presentation" has some plugin to connect with Matlab, but E-Prime seems not to have that. But there may be another way...<br>
<br>
Am Montag, 6. Mai 2013 15:39:19 UTC+2 schrieb Tobias:<br>
Dear all,<br>
<br>
Does anyone have experience with running Polhemus Liberty (the motion tracking system) with E-Prime?<br>
<br>
Best,<br>
Tobias<br>
</div></div></blockquote><div><div>
<br>
-- <br>
You received this message because you are subscribed to the Google Groups "E-Prime" group.<br></div>
To unsubscribe from this group and stop receiving emails from it, send an email to <a>e-prime+u...@<u></u>googlegrou<u></u>ps.com</a>.<br>
To post to this group, send email to <a>e-p...@googlegroups.com</a>.<br></div><div><div><div>
For more options, visit <a href="https://groups.google.com/groups/opt_out" target="_blank">https://groups.google.com/<u></u>grou<u></u><u></u>ps/opt_out</a>.<br>
<br>
<br>
</div></div></div></blockquote></div><br></div>
</blockquote><div>

<p></p>

-- <br>
You received this message because you are subscribed to the Google Groups "E-Prime" group.<br>
To unsubscribe from this group and stop receiving emails from it, send an email to <a>e-prime+u...@<u></u>googlegroups.com</a>.<br>
To post to this group, send email to <a>e-p...@googlegroups.com</a>.<br></div></div></div><div class="im">
To view this discussion on the web visit <a href="https://groups.google.com/d/msg/e-prime/-/kIUzT6nN__AJ" target="_blank">https://groups.google.com/d/<u></u>msg/e-prime/-/kIUzT6nN__AJ</a>.<div><div><br>

For more options, visit <a href="https://groups.google.com/groups/opt_out" target="_blank">https://groups.google.com/<u></u>groups/opt_out</a>.<br>
 <br>
 <br>
</div></div></div></blockquote></div><br></div>
</blockquote><div class="im">

<p></p>

-- <br>
You received this message because you are subscribed to the Google Groups "E-Prime" group.<br>
To unsubscribe from this group and stop receiving emails from it, send an email to <a href="mailto:e-prime%2Bunsubscribe@googlegroups.com" target="_blank">e-prime+unsubscribe@googlegroups.com</a>.<br>
To post to this group, send email to <a href="mailto:e-prime@googlegroups.com" target="_blank">e-prime@googlegroups.com</a>.<br></div>
To view this discussion on the web visit <a href="https://groups.google.com/d/msgid/e-prime/93e38bb4-7a0b-465d-94f5-42618affecd0%40googlegroups.com?hl=en-US" target="_blank">https://groups.google.com/d/msgid/e-prime/93e38bb4-7a0b-465d-94f5-42618affecd0%40googlegroups.com?hl=en-US</a>.<div class="HOEnZb">
<div class="h5"><br>
For more options, visit <a href="https://groups.google.com/groups/opt_out" target="_blank">https://groups.google.com/groups/opt_out</a>.<br>
 <br>
 <br>
</div></div></blockquote></div><br></div>

<p></p>

-- <br />
You received this message because you are subscribed to the Google Groups "E-Prime" group.<br />
To unsubscribe from this group and stop receiving emails from it, send an email to e-prime+unsubscribe@googlegroups.com.<br />
To post to this group, send email to e-prime@googlegroups.com.<br />
To view this discussion on the web visit <a href="https://groups.google.com/d/msgid/e-prime/CAKAdR-vEm0%2Bc%2B%2B8BJ8VWXTPC9qeDYtT5Jov90e369L%2BMTqzxEQ%40mail.gmail.com?hl=en-US">https://groups.google.com/d/msgid/e-prime/CAKAdR-vEm0%2Bc%2B%2B8BJ8VWXTPC9qeDYtT5Jov90e369L%2BMTqzxEQ%40mail.gmail.com?hl=en-US</a>.<br />
For more options, visit <a href="https://groups.google.com/groups/opt_out">https://groups.google.com/groups/opt_out</a>.<br />
 <br />
 <br />