08-08-2013 03:41 PM
Hello all,
Is it possible to create a 1 D array with the "build array VI" when receiving random number?
I am receiving random data and the build array VI always create a 2D array which might cause some problem if you want to compute certain type of operation after.
Any example will be welcomed.
Thank you,
Israel
08-08-2013 03:52 PM
Build Array (technically it is called a "primitive," not a VI) generates an array at the output which has one more dimension than the inputs. So it sounds like at least one of your inputs is already a 1D array.
Please post your code so we can see what is happening.
Lynn
08-08-2013 03:55 PM
r-click the Build array and select Concatenate input.
/Y
08-09-2013 07:00 AM
Hello Lynn and Yamaeda
First I want to Thank you Lynn for your linguistic contribution indeed "Build Array" is a primitive and not VI, thank you for the education. In reality what I am doing is simple.
I have two arrays of complex elements Array1 and Array2.
Array1 conains the complex elements ""(a0+ib0) ; (a1+ib1) ;...(an+ibn) ;
Array2 conains the complex elements ""(c0+id0) ; (c1+id1) ;...(cn+idn)
What I want to do is the multiplication of the first array by the conjugate of the second array element.
Array1*(Conjugate Array 2)" for the first element the results is "(a0.C0-b0.d0) + i(b0c0-a0d0)" and the etc...
and then taking the square root ([(a0.C0-b0.d0) power of 2]) + [(b0c0-a0d0) power of 2])
I was wondering if there were some dedicate primitive that could solve the computation above which is the cross correlation in Frequency domain.
Thank you very much.
Israel
08-09-2013 09:39 AM
The functions on the Numeric palette are polymorphic. That means that they will accept multiple datatypes. For your case you benefit twice. The work on complex numbers and arrays of complex numbers. The Complex subpalette of the Numeric palette has a Complex Conjugate function. RMS.vi is in Mathematics >> Probability & Statistics palette.
I did work though the math manually to see if the answers are correct for the arbitrary values I chose.
Lynn
08-11-2013 01:59 AM
Is this useful?
08-11-2013 10:51 AM - edited 08-11-2013 10:52 AM
@Hohohihijj wrote:
Is this useful?
Don't overcomplicate things! You are using way too much code. Everything in the red box could be replaced by a single "absolute value" function. Try it!
(I think there are further simplifications possible....)
Also, why are you using CXT and EXT? CDB and DBL are sufficient in most scenarios.
08-11-2013 11:18 PM
Thanks a lot.
08-12-2013 11:10 AM
Hello Guys,
Your help is amazing, but I will do, If I want to do the following operation (a*a+b*b) power 0.75 or other value. Thank you to all you.
Israel
08-12-2013 12:47 PM
@israel.haifa wrote:
Hello Guys,
Your help is amazing, but I will do, If I want to do the following operation (a*a+b*b) power 0.75 or other value. Thank you to all you.
Israel
Square and Power of X should do it, no?
/Y