Thanks Stuart, I think I can do something with Automation Server. My
requirements are broadly as follows:
Based on the value of an incoming variable (through UDP port) I need
to run an optimization, which then sets a few other variables and
send a reply back to the source (through UDP). The first datastream
is very fast, almost 100 values per second. However, the subsequent
optimization takes a lot more time, and hence the source needs to
wait for a while before it gets feedback. The feedback is
timecritical and affects the system state. If it is delayed, all the
future values from the source (the first datastream) would be biased.
Now, all of this was being done on a MATLAB running on an AMD 64bit
dualprocessor machine. My solution was to set another similar
machine that should run the optimization part and then send the
resulting feedback to the source directly. It would have been nice if
somehow I could share the worksapces of these MATLABs, making the
couple faster. The other solution was to break the optimization is
parts and somehow use grid computing (which I don't know!).
I provided details as Lars Gregersen mentioned in his reply that
MATLAB is not meant for real time. It might not be, but it does work
really good in real time! Lars also provided useful hints that really
helped a lot. I wonder if I should program all this in C and then
call it in MATLAB. It might make the optimization faster though I
want something that could make a difference beyond the margin.
>
>
> You could look at starting MATLABs as automation servers.
>
> <http://www.mathworks.com/access/helpdesk/help/techdoc/matlab_external/f86798.html>
>
> Stuart
>
> "Lars Gregersen" <larsg @ comsol . dk> wrote in message
> news:nco2p1t7bsrsbv1e4c16q1fp33j6kf8pht@4ax.com...
>> On Sat, 3 Dec 2005 02:54:31 0500, "Zahid Ullah Khan"
>> <zahidullah@gmail.com> wrote:
>>
>>>I got two questions.
>>>Question 1. Can one MATLAB access the workspace of another
> MATLAB?
>>>Case 1: Assuming that both MATLABs are running on the same
PC,
> Case
>>
>> help memmapfile
>>
>>>2: Assuming that they run on different computers on a LAN. I
can
>>>think of one possible way, that is that one MATLAB save its
> workspace
>>>on the disk and then the other one might read it. However,
that
> is
>>>inefficient for realtime highspeed operations. Similarly
ferrying
>>>these workspaces using UDPs are inefficient in the given
> situation.
>>
>> Matlab is not meant for realtime work. What are your realtime
>> requirements?
>>
>> If you need to move data from one computer box to another you
> need to
>> do this by some use of the network. Whether you use the file
> system do
>> the transfering or you programme the UDP/TCP networking
yourself
> is up
>> to you. However, since Matlab is singlethreaded you may not be
> able to
>> get the performance you need.
>>
>> I guess you don't need to transfer the entire workspace, but
only
> the
>> parts that have actually changed.
>>
>>>Question 2. Can there be a trigger event in MATLAB based on
the
>>
>> No, there are no such triggers in Matlab.
>>
>>
>> The solution is probably to create a solution using a mix of
> computer
>> languages. One for the numerics (Matlab) and one for the
transfer
> and
>> syncronisation of data (C/C++, Java, etc.)
>>
>>
>> Lars
>>
>> Lars Gregersen
>> COMSOL A/S
>> <http://www.comsol.dk>
>
>
>
