LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

binary matrix multiplication

Solved!
Go to solution

i posted another table entry copy pasted. i should have checked it, sorry

 

Ok here my question, how do i do this?

 

Screen Capture #124.png

 

 

Below is the corrected table of the previously posted table:

 

Screen Capture #125.png

 

0 Kudos
Message 31 of 40
(2,083 Views)

Hi sumalama,

 

to end this nearly endless discussion (with bad problem descriptions): Why don't you just program what you have written on your frontpanel comment?

Like this:

check.png

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 32 of 40
(2,080 Views)

How is this "NEW" version correct?

 

Look at row 4 of table X.  It is 1 1 0.

Look at column 2 of table Y.  It is 1 1 0.

The math would be 1x1 + 1x1 + 0x0 = 1 + 1 +1 which equal 2

 

Your output table of row 4 column 2 says 0.

 

Your math just doesn't add up!

0 Kudos
Message 33 of 40
(2,079 Views)

GredW, the program is still incomplete, it only works for the first three input rows(x). The outputs for other rows are incorrect. Please see this-

 

Screen Capture #127.png

 

I think your program needs only few modification. thanks

 

RavensFan- the output result is correct- The math would be 1x1 + 1x1 + 0x0 = 1 + 1 +0 which equal 0 (since in modulo-2 addition 1+1=0)

 

Best

Susan

0 Kudos
Message 34 of 40
(2,053 Views)

Where did this "modulo 2" stuff come from?  You never described that in your earlier messages.

 

Take the cross product.  Then use the Remainder output of the quotient Remainder Function when you divide the array by two.

 

Or just take the array and AND it with an array of 1's of the same size.

 

Done!

0 Kudos
Message 35 of 40
(2,041 Views)

RavensFan- i didn't clearly understand your solution, could you perhaps attach a screenshot?

 

thanks,

susan

0 Kudos
Message 36 of 40
(2,034 Views)
Solution
Accepted by topic author sumalama

Both ways shown.

 

 

Message 37 of 40
(2,020 Views)

Hah finally RavensFAN solved what i have been looking for days. thanks a lot. I didn't think it would be so simple and how can I think of that- how is that ANDing possible with AxB outputs which has a 2 in it?

 

I thought it would involve indexing, multiplication and addition of rows and column within some loops, and that was complex for me being a beginner. I think there is a way on this too and perhaps is more mathematically constructive way of doing. But RavensFAN solution provides alternative method of the same problem even quicker.

 

I think GerdW is not signed today in to infer his solution. I hope to hear his solution too.

 

Thanks everybody who has provided inputs to my question, i really appreciate your time. maybe my question wasn't clearly posted at the beginning otherwise i may had solution earlier.

 

Best,

Susan

0 Kudos
Message 38 of 40
(2,009 Views)

Hi Susan,

 

<irony>

it's always fun to provide solutions where the OP is saying "Um, wrong, because I forgot to mention..." afterwards...

</irony>

 

Is it realy that hard to explain your task? At first you talk about "binary" (aka boolean) operations like AND and OR. When you got a solution per your description you say "No, it is modulo math!".

 

You should definitely have learned by now to write questions with all the information needed for a possible solution...

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
Message 39 of 40
(1,996 Views)
Also useful to state up front if you only accept coded solutions. I gave the answer verbally a number of posts back.
0 Kudos
Message 40 of 40
(1,975 Views)