[kepler-users] Arrays Multiplication

Christopher Brooks cxh at eecs.berkeley.edu
Sat Jan 21 11:26:17 PST 2012


Muhannad,
Ah, that explains it.  The problem was not not finding the actor but not 
finding the documentation for matrices and arrays.

In Kepler, if you double click on the Multiply or Divide actor, then the 
Edit Parameters window has a Help button that bring up the documentation 
for the Ptolemy II Expression language.

The Expression Language is documented in the Ptolemy II Design Document, See
http://ptolemy.berkeley.edu/ptolemyII/designdoc.htm

See also
http://ptolemy.berkeley.edu/ptolemyII/ptIIlatest/ptII/doc/expressions.pdf
for the 2010 version.

The idea of adding documentation about the expression language to the 
actors is an interesting one.  It is hard to know where to stop though, 
since the expression language can be used in any Parameter.  Another 
issue is that it is hard to know where to say that the documentation 
resides because an actor can be used inside Ptolemy II or Vergil or 
outside of a GUI.

What I did do was add documentation to the Ptolemy II Const actor and 
the Kepler Constant.xml file.


<p>The Ptolemy II Expression language defines the syntax
for the <i>value</i> parameter.  In Kepler, documentation is available
via the Help button in the Edit Parameters window.  Documentation
is also available on-line at
<a 
href="http://http://ptolemy.berkeley.edu/ptolemyII/designdoc.htm#in_browser">http://ptolemy.berkeley.edu/ptolemyII/designdoc.htm</a>.</p>

The reason I chose the Const actor is because the MultiplyDivide actor 
has no parameters and because Const is a fairly basic actor that is 
among the first actors new users will try.

_Christopher

On 1/21/12 9:43 AM, Ali, Muhannad wrote:
> Thanks Edwad and Christopher!
>
> @Christopher: actually I found it but I didn't know in which syntax I 
> have to provide my Matrix/Vector data. It would be very helpful if the 
> documentation of MuliplyDivide actor includes the example provided by 
> Edward.
>
> Thanks once again!
>
> Muhannad
>
> On Jan 21, 2012, at 6:33 PM, Christopher Brooks wrote:
>
>> Muhannad,
>> The MultiplyDivide actor in Ptolemy does this, see attached.
>>
>> I'm surprised you could not find this actor in Kepler.
>>
>> When I entered "Multiply" into "Search Components" and hit "Search" 
>> it came right up.
>>
>> _Christopher
>>
>>
>> On 1/21/12 9:27 AM, Edward A. Lee wrote:
>>>
>>> Sure, just about anything that does multiplication will handle 
>>> matrices.
>>> MultiplyDivide, Expression, FIR, etc.  Math operations are polymorphic.
>>> Matrices are specified in MATLAB syntax in the expression language.
>>> E.g, in the Expression Evaluator:
>>>
>>> >> [0, 1;1, 0]*[2; 3]
>>> [3;2]
>>>
>>> Edward
>>>
>>> On 1/21/12 5:25 AM, Ali, Muhannad wrote:
>>>> Hello,
>>>>
>>>> is there any actor that multiplies two arrays? I need to multiply a 
>>>> 2D array (mXn) with a vector(n).
>>>>
>>>> Thanks!
>>>>
>>>> Muhannad
>>>> _______________________________________________
>>>> Kepler-users mailing list
>>>> Kepler-users at kepler-project.org
>>>> http://lists.nceas.ucsb.edu/kepler/mailman/listinfo/kepler-users
>>>
>>>
>>> _______________________________________________
>>> Kepler-users mailing list
>>> Kepler-users at kepler-project.org
>>> http://lists.nceas.ucsb.edu/kepler/mailman/listinfo/kepler-users
>>
>> -- 
>> Christopher Brooks, PMP                       University of California
>> CHESS Executive Director                      US Mail: 337 Cory Hall
>> Programmer/Analyst CHESS/Ptolemy/Trust        Berkeley, CA 94720-1774
>> ph: 510.643.9841                                (Office: 545Q Cory)
>> home: (F-Tu) 707.665.0131 cell: 707.332.0670
>> <MultiplyMatrixAndArray.xml>
>

-- 
Christopher Brooks, PMP                       University of California
CHESS Executive Director                      US Mail: 337 Cory Hall
Programmer/Analyst CHESS/Ptolemy/Trust        Berkeley, CA 94720-1774
ph: 510.643.9841                                (Office: 545Q Cory)
home: (F-Tu) 707.665.0131 cell: 707.332.0670

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.nceas.ucsb.edu/kepler/pipermail/kepler-users/attachments/20120121/8c3daf62/attachment.html>


More information about the Kepler-users mailing list