Showing results for 
Search instead for 
Did you mean: 

Multiply Arrays

Hi all,
i'm again stuck with my programm... I wanted to give it another try and want to see if you got any other suggestions for my programm..
I have to split a EMG signal (around 36000 points) to 256-512-256 as draws in the picture.
The first part (256) can be eliminated, the second part (512) has to be multiplied with a Sine Wave. Than half of the 512 has to been added to the remaining 256 to run it again.
So all the 36000 points have to be multiplied with the Sine wave.
Anyone got a quick and WORKING idea?
thnx a lot!
0 Kudos
Message 1 of 5

Hi MrHond,

I haven't worked with an EMG signal, but this looks like an array-handling question anyway.

If nobody else replies, maybe you could follow-up with a bit of clarification...

Is each data-point a 32-bit value?.  Are the 8 "left-most" bits unused?  I'm confused by "512" and wonder if it's meant to represent the middle 16 bits(?)


Message Edited by Dynamik on 05-25-2006 09:17 PM

When they give imbeciles handicap-parking, I won't have so far to walk!
Message 2 of 5
Thanks for your reaction...
the type of data is just a 1D array. I splitted the arrays so that i can multipli them more easily. The data is collected with 16 bits.
Actually it doesn't matter real much how it's been collected. All the signals have been stored in a LVM and been reopened for further use. So now i got a 1D array (Array A) that has to be multiplied with another 1D array (Array B --> 1024 points). Cell by cell.
The problem is that i have to take 1024 points from the EMG data (Array A), eliminate the first 256 and multiply the 512 with the data  from Array B.
after that multiplication I have to split the 512 in half and add that part (with the 2nd 256 part) to the original EMG data (Array  A).
After that, i;ll have to do the same over and over again, untill I Multiplied all the data from Array A with Array B. It's a sort of sliding window.
The whole programm is based on difficult formulas and mathematics. If i have to explain this all i'll be here tomorrow. But The text above is my problem and my final step in finishing my program. I hope u can help me out!
instead of using the 1024, 256 an 512 point u can also use for example 2-4-2 and 8 Doesn't matter to me... As long as i get a clue what to do! Because my mind is overloaded at the moment because of this problem. I don't know what to do anymore!
btw, nice quote:
If something can go wrong,       plan on it.
0 Kudos
Message 3 of 5

Hi MrHond,

      While this smells like a simple/regular problem, my mind is mushy today and it's not quite clear - the phrase "split the 512 in half and add that part (with the 2nd 256 part)" is still confusing to me!  Until somebody who recognizes the math steps-in, perhaps you'll have the patience to clarify a bit further

If the EMG data, Sine-wave data, Result data are divided into 256-sample segments, where the segments are represented as E(i), S(i) and R(i) (representing the i'th segment of each) then does the following describe your goal?

R(0) = E(0) (discarded)

R(1) = E(1) * S(1)

R(2) = R(1) + E(2) * S(2) (?)

R(3) = R(2) + E(3) * S(3) (???)

R(4) = ?


> btw, nice quote:


Message Edited by Dynamik on 05-26-2006 01:39 PM

Message Edited by Dynamik on 05-26-2006 01:42 PM

When they give imbeciles handicap-parking, I won't have so far to walk!
Message 4 of 5
Hi MrHond,

Boy, I am not sure if I get this but it's not going to stop me from giving it a stab

Am I even in the ball park with what you're trying to do. Of note is I assume you have 36864 pts (an even multiple of 1024)?



Message Edited by Russ Evans on 05-26-2006 11:00 PM

Message 5 of 5