cancelar
Mostrando resultados para 
Pesquisar então 
Você quer dizer: 

How to integrate an Array with the other Array???

Resolvido!
Ir para a solução

Hi guys, 

 

I have such a problem that need your help!!

 

I have two columns, the first column is Time (x): 1, 1.2, 1.5, 1.7, 1.8... which is uneven array.

 

The second column is Y :  3, 5, 7, 8....

 

X and Y have the same length, but the x is uneven. Now I want to do the integration of Y on x. When I use the uneven numeric integration, I found that the integration result is only one value instead of an array. But what I need is the third column which shows the integration results C. So I could plot C against x, and know how the integration goes.

 

Does anyone has such an experience, thanks a lot!Smiley feliz

 

Basically, what I need is just like the integration what the Origin Pro does.

 

Tao

 

Capture.PNG

0 Kudos
Mensagem 1 de 8
4.030Exibições

What do you mean by "X is uneven"?

 

What do you mean by column C to see how the integration goes?  Do you mean that you want to see the integration from X0 to the current X step by step throughout the whole array?

0 Kudos
Mensagem 2 de 8
4.006Exibições

Is this what you are looking for?

 

0 Kudos
Mensagem 3 de 8
3.988Exibições
Solução
Aceita pelo autor do tópico tzou

Or at little bit cleaner code...

0 Kudos
Mensagem 4 de 8
3.986Exibições

Yes, exactly.

0 Kudos
Mensagem 5 de 8
3.966Exibições

Hey,

 

I input the same T and current values as you gave to Origin Pro, and do the integration, the values are different from this VI. I am confusedSmiley feliz

0 Kudos
Mensagem 6 de 8
3.953Exibições

Chris' VI just does a continuous summation of the Y values.  It failed to do the multiplication by the dX.

 

You still haven't said what you meant by uneven X.  Did you mean that the delta X's are unequal?

0 Kudos
Mensagem 7 de 8
3.940Exibições

Hey, Thanks for your reply.

 

I have figured this out based on what Origin does.

 

Thanks again.

0 Kudos
Mensagem 8 de 8
3.926Exibições