From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

range sum

Solved!
Go to solution

Hello guys, can anyone help me to solve that app (see in pic).

I need to do that in labview and i don t know how.

that  "q" is user adjustable

0 Kudos
Message 1 of 5
(3,167 Views)
Solution
Accepted by topic author iHack94

First, it will take a very long time to do an infinite sum, even with LabVIEW.  But assuming that you will settle for a finite sum, all you need to do is return to the Forum, look in the upper right part of the LabVIEW section's first page, and click on Learn LabVIEW Basics -- it will probably teach you enough so that you will be able to solve this problem by yourself.  Of course, you'll need to know how to specify the variable/function "q" ...

 

Bob Schor

0 Kudos
Message 2 of 5
(3,142 Views)

i read something and i dont know how solve that because is my first day with labview and i want see how that app is solve

0 Kudos
Message 3 of 5
(3,116 Views)
Solution
Accepted by topic author iHack94

One good way to think about how to program any problem, regardless of the programming language is to ask yourself how you would solve it with pencil and paper or on a simple calculator.

 

For your particular problem there are a few steps you might take.

 

First, you indicated that the value of q is user selectable. So you need to determine how the user will do that selection. Next you could check to see if the value entered is within the specified range.  If it is out of range, you need to decide what happens.

 

Second, how will you calculate q^n?  For small values of n it is straightforward, but as n gets large this might be awkward to program. Hint: Consider alternate formulations of the problem.

 

Third, how will you calculate the sum? As Bob Shor pointed out you cannot sum an infinite number of elements in finite time. So, how will you decide when N < infinity is large enough? How much error will occur? Can you calculate or estimate the error?

 

Finally, how will you implement the steps in the chosen programming language, LabVIEW?

 

Nothing about this problem requires advanced knowledge of LabVIEW but it does require understanding the mathematics and learning the basics of LV.

 

Lynn

Message 4 of 5
(3,089 Views)

LabVIEW does not do symbolic math, but that's what you need here.

 

You can use wolfram alpha to get the solution formula or derive it yourself from first principles.

 

 

 

This is trivial to implement in LabVIEW. try it!

 

0 Kudos
Message 5 of 5
(3,058 Views)