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@kepler-project.org
http://lists.nceas.ucsb.edu/kepler/mailman/listinfo/kepler-users
_______________________________________________
Kepler-users mailing list
Kepler-users@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
<?xml version="1.0" standalone="no"?>
<!DOCTYPE entity PUBLIC "-//UC Berkeley//DTD MoML 1//EN"
"http://ptolemy.eecs.berkeley.edu/xml/dtd/MoML_1.dtd">
<entity name="MultiplyMatrixAndArray" class="ptolemy.actor.TypedCompositeActor">
<property name="_createdBy" class="ptolemy.kernel.attributes.VersionAttribute" value="9.0.devel">
</property>
<property name="SDF Director" class="ptolemy.domains.sdf.kernel.SDFDirector">
<property name="iterations" class="ptolemy.data.expr.Parameter" value="3">
</property>
<property name="_location" class="ptolemy.kernel.util.Location" value="{85, 30}">
</property>
</property>
<property name="_windowProperties" class="ptolemy.actor.gui.WindowPropertiesAttribute" value="{bounds={433, 270, 813, 510}, maximized=false}">
</property>
<property name="_vergilSize" class="ptolemy.actor.gui.SizeAttribute" value="[600, 400]">
</property>
<property name="_vergilZoomFactor" class="ptolemy.data.expr.ExpertParameter" value="1.0">
</property>
<property name="_vergilCenter" class="ptolemy.data.expr.ExpertParameter" value="{300.0, 200.0}">
</property>
<entity name="MultiplyDivide" class="ptolemy.actor.lib.MultiplyDivide">
<property name="_location" class="ptolemy.kernel.util.Location" value="[285.0, 105.0]">
</property>
</entity>
<entity name="Const" class="ptolemy.actor.lib.Const">
<property name="firingCountLimit" class="ptolemy.data.expr.Parameter" value="NONE">
</property>
<property name="value" class="ptolemy.data.expr.Parameter" value="[1,2,3;4,5,6;7,8,9]">
</property>
<doc>Create a constant sequence.</doc>
<property name="_icon" class="ptolemy.vergil.icon.BoxedValueIcon">
<property name="attributeName" class="ptolemy.kernel.util.StringAttribute" value="value">
</property>
<property name="displayWidth" class="ptolemy.data.expr.Parameter" value="60">
</property>
</property>
<property name="_location" class="ptolemy.kernel.util.Location" value="{125, 110}">
</property>
</entity>
<entity name="Const2" class="ptolemy.actor.lib.Const">
<property name="firingCountLimit" class="ptolemy.data.expr.Parameter" value="NONE">
</property>
<property name="value" class="ptolemy.data.expr.Parameter" value="{1,2,3}">
</property>
<doc>Create a constant sequence.</doc>
<property name="_icon" class="ptolemy.vergil.icon.BoxedValueIcon">
<property name="attributeName" class="ptolemy.kernel.util.StringAttribute" value="value">
</property>
<property name="displayWidth" class="ptolemy.data.expr.Parameter" value="60">
</property>
</property>
<property name="_location" class="ptolemy.kernel.util.Location" value="[120.0, 180.0]">
</property>
</entity>
<entity name="Display" class="ptolemy.actor.lib.gui.Display">
<property name="_windowProperties" class="ptolemy.actor.gui.WindowPropertiesAttribute" value="{bounds={1013, 111, 484, 223}, maximized=false}">
</property>
<property name="_paneSize" class="ptolemy.actor.gui.SizeAttribute">
</property>
<property name="_location" class="ptolemy.kernel.util.Location" value="{440, 115}">
</property>
</entity>
<relation name="relation" class="ptolemy.actor.TypedIORelation">
</relation>
<relation name="relation2" class="ptolemy.actor.TypedIORelation">
</relation>
<relation name="relation3" class="ptolemy.actor.TypedIORelation">
</relation>
<link port="MultiplyDivide.multiply" relation="relation"/>
<link port="MultiplyDivide.multiply" relation="relation2"/>
<link port="MultiplyDivide.output" relation="relation3"/>
<link port="Const.output" relation="relation"/>
<link port="Const2.output" relation="relation2"/>
<link port="Display.input" relation="relation3"/>
</entity>
_______________________________________________
Kepler-users mailing list
Kepler-users@kepler-project.org
http://lists.nceas.ucsb.edu/kepler/mailman/listinfo/kepler-users