LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How can I write a sum formula in LabView? Help!!

GerdW,

how do you divide two sum formulas`?

0 Kudos
Message 11 of 24
(1,851 Views)

Hi Anni,

 

how do you divide two sum formulas`?

Look carefully at that CompoundMath node…

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 12 of 24
(1,846 Views)

AnnihilationSpectrum,
It will be much better if you show YOUR code and data values instead of just asking "how to do"

0 Kudos
Message 13 of 24
(1,843 Views)

dear artem and gerdw,
i build gerdw solution. I wrote numbers on the panel randomly and the results always give a zero.

Untitled_6d.pngUntitled_6p.png

0 Kudos
Message 14 of 24
(1,838 Views)

Hi.

It's normal that you obtain that result as you make a sum from k to kr with k > kr, which is 0.

You also have to be careful as you didn't invert one of the entry on the compoundmath so you're doing only multiplications here and not a multiplication and a division.

 

P.S : you can also press ctrl+u once to clean-up a bit this diagram.

0 Kudos
Message 15 of 24
(1,829 Views)

You write all 2354 element for "n", or create "zero filled" array with last element = 125?
And also you always take array size = (A-B) where A<B, so your array sunset is empty (length less than zero). Of course summ will 0.

0 Kudos
Message 16 of 24
(1,835 Views)

Hi Anni,

 

i build gerdw solution.

No, you didn't!

As I said before: look carefully at this CompoundMath node! You can invert inputs and output of that function…

 

I wrote numbers on the panel randomly and the results always give a zero.

When your indices (k, kr) are in the order of 11000 then your input array "n" needs atleast that much elements. Did you input enough elements for the array???

You should use "known" inputs instead of some "random" ones!

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
Message 17 of 24
(1,817 Views)

Hello again. Left and right sides are not equal in spectrum. There's a background on the left. By using spectral data, they want me to implement the front panel to the formula in the picture. they want to match the left side of the spectrum to the right. im sorry my bad english.

Download All
0 Kudos
Message 18 of 24
(1,772 Views)

@Artem.SPb wrote:

AnnihilationSpectrum,
It will be much better if you show YOUR code and data values instead of just asking "how to do"


Why?  How to, is what learning is all about!  Now, showing what's been failing, helps us teach, but I think that learning is preferable to trick or treating on these forums.


"Should be" isn't "Is" -Jay
Message 19 of 24
(1,762 Views)

Hi Anni,

 

they want me to implement the front panel to the formula in the picture.

So you should do your job!

 

they want to match the left side of the spectrum to the right.

Then apply that formula if it has been given to you!

(From the scale labels it rather looks like a histogram.)

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 20 of 24
(1,755 Views)