LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

array subset output malfunction

I ran your code and attempted concatenating all the data within a single array for each of the magnitude, phase and coherence.

 

The above graphs show the concatenated results, wheras the bottom shows your original results.

I know I'm rusty in this area, but neither look correct.  What should be the correct output?  What are you expecting?

 

 

0 Kudos
Message 31 of 37
(1,246 Views)

Thanks Ray!

 

If I am thinking about this right, concatenation is where the array is added from one end to the other.  So for concatenation the array AB(length 2)+CD(Length 2)=ABCD (Length 4)?  Whereas I need an ensemble of the data, Array (AB+CD)/2=AD (Length 2) Where each point in AB and CD is added then divided by 2. 

 

The magnitudes are the same, when scaled correctly.  I am trying to get the same as the Bode plot for the SS Matrice in the first .vi or matalb.  Coherence of the concatenation looks pretty good. 

0 Kudos
Message 32 of 37
(1,234 Views)

@northwood wrote:

Thanks Ray!

 

If I am thinking about this right, concatenation is where the array is added from one end to the other.  So for concatenation the array AB(length 2)+CD(Length 2)=ABCD (Length 4)?  . 


Yes


@northwood wrote:
Whereas I need an ensemble of the data, Array (AB+CD)/2=AD (Length 2) Where each point in AB and CD is added then divided by 2. 

Well...  there are 10 iterations..  So it would become ABCDEFGHIJKLMNOPQRST, so do you still divide by 2?  😉

Or do you mean: (AB+CD+EF+GH+IJ+KL+MN+OP+QR+ST)/10  ?

 

Are we looking at an average of each iteration?  You lost me..

 


@northwood wrote:
The magnitudes are the same, when scaled correctly.  I am trying to get the same as the Bode plot for the SS Matrice in the first .vi or matalb.  Coherence of the concatenation looks pretty good. 

So you mean the plots I provided actually looked like what you were looking for?  If so, I can post the code change for you.

 

0 Kudos
Message 33 of 37
(1,219 Views)
@northwood wrote:
Whereas I need an ensemble of the data, Array (AB+CD)/2=AD (Length 2) Where each point in AB and CD is added then divided by 2. 

Well...  there are 10 iterations..  So it would become ABCDEFGHIJKLMNOPQRST, so do you still divide by 2?  😉

Or do you mean: (AB+CD+EF+GH+IJ+KL+MN+OP+QR+ST)/10  ?

 

Are we looking at an average of each iteration?  You lost me..

 


Each array should be added to the next and divided by the total number of arrays.  So like matlab code AB(1)+CD(1)+...../10 then AB(2)+CD(2)..../10 etc etc.  Until you have an array the same size as the original AB but the average across all iterations.  See ensemble average here:  http://www.numberwatch.co.uk/averages.htm

 


The Bode Plots still aren't as clear as I would like.  The upper (100rad/s+) frequencies just won't come out very clear, I think it has something to do with my Signal generator and step size.  You guys have helped tons though I really appreciate it.  How did you make the coherence and stuff so clear?  I am not sure how you did it. 

 

Thanks!

0 Kudos
Message 34 of 37
(1,206 Views)

See the attached VI, which is your version with a slight modification.

 

I did not cleanup the code.  It is in LV 2010.

0 Kudos
Message 35 of 37
(1,194 Views)

Thank You!

0 Kudos
Message 36 of 37
(1,182 Views)

Did that work for you?

0 Kudos
Message 37 of 37
(1,170 Views)