cancelar
Mostrando los resultados de 
Buscar en lugar de 
Quiere decir: 

Average Sub Arrays

¡Resuelto!
Ir a solución

Hello,

 

I'm trying to have a vi that receives an array from file, then constructs sub arrays (according to  FPS/Average Array Every), then takes the mean, finds the difference from each data point, and counts the number of times where the difference is larger than the threshold. Please review the attached file--my block diagram.

At this point, the vi is running but the is a bug in the code which I can't find :-(.

When I run it on some sample data counter returns~350 where it suppose to be only 3.

I'll appreciate if you can take a look at it.

 

Thank you,

 

P.S..

I'll be happy to upload the vi and a sample data file if needed.

0 kudos
Mensaje 1 de 7
4.285 Vistas
Solución
Aceptado por simply_me

simply_me,

 

You take an array subset, get the mean that looks ok.  But then you figure out the difference between the mean and the entire array you started with instead of the subset you used to calculate the mean.  Am guessing you meant to do this.

 

Mensaje 2 de 7
4.239 Vistas

Thanks Wayne. C, it's working great now!

0 kudos
Mensaje 3 de 7
4.211 Vistas

how would i do an average of an array from 

index 100 to 300?

 

 

if i have an array of 2000 indexes,

how can i get the average from 100-300?

 

in 

excel it would be

=avg(C100:C300)

 

 

Best regards,
Krispiekream
0 kudos
Mensaje 4 de 7
3.844 Vistas

You should really start a new thread instead of adding to an old thread that is already marked as solved!)

 

Use array subset, then take the mean of the subset.

Mensaje 5 de 7
3.826 Vistas

haha. ok..i will do that next time.

i just thought i don't wanna borther more people.. 

i wanna make sure i search the forum for answers before i post my own post.

but thanks. 

 

Untitled.png

 

Best regards,
Krispiekream
0 kudos
Mensaje 6 de 7
3.774 Vistas

krispiekream wrote:

i just thought i don't wanna borther more people.. 


You ARE bothering more people by adding to an old thread, because some of the old participants might still subscribe to updates.

0 kudos
Mensaje 7 de 7
3.764 Vistas