[kepler-users] Arrays Multiplication

Ali, Muhannad muhannad.ali at student.kit.edu
Sun Jan 22 11:50:39 PST 2012


Another question please:

why when I use MultiplyDivide actor to multiply two matrices (the two provided by Edward), I cannot use the VectorDisassembler actor? The result of the multiplication is a vector too, isn't it?
I get the following error message: "ptolemy.actor.TypeConflictException: Type conflicts occurred in .Build2DMatrix on the following inequalities:
  (ptolemy.actor.TypedIOPort {.xxx.Multiply or Divide.output}, general) <= (ptolemy.actor.TypedIOPort {.xxx.Vector Disassembler.input}, [double])"

Thanks!

Muhannad


On Jan 21, 2012, at 6:43 PM, Muhannad Ali 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<mailto: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<mailto: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>


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


More information about the Kepler-users mailing list