09-21-2018 12:44 AM
There are two equations I would like to solve using a loop with labview, but am having trouble figuring out the correct structure to use and how to get it to work properly. They are:
(sin(1))3 * (sin(2))6 * (sin(3))9 *… * (sin(10))30
and
1*2*3 + 2*3*4 + 3*4*5 + ... + 18*19*20.
Any help is greatly appreciated.
09-21-2018 12:46 AM
Seems like homework, try something and post the one which you tried based on which others will guide you to achieve your result.
09-21-2018 01:10 AM
I have this to start with for the first problem. But I don't know how to start the loop at 1 instead of n-1, and I don't know how to multiply the value for one pass of the loop to the next value.
09-21-2018 01:45 AM
Use this sample and try for other query.
09-21-2018 01:38 PM
When any of us do your homework for you, we are cheating you of the opportunity to learn something. Any of us who have become reasonably competent in programming any language knows that the best way to learn a language (true of written and spoken language, as well) is to use it, which in your case means solving your own problems. What you should have done is to try it yourself and post the VI you wrote, however "bad" it is. If we see that there is a conceptual error you are having, we can explain the nature of the problem, and the next time, you'll "get it".
Please, try to do your own work first, show what you've done (so we'll understand where you are having difficulty and can help to teach you, rather than "doing it for you").
Bob Schor
09-22-2018 01:54 PM
Hi Need,
But I don't know how to start the loop at 1 instead of n-1,
To "start" the loop with "1" instead of "0" (as the loop iterator starts with zero) you might use some very simple math expression like "+1"…
I don't know how to multiply the value for one pass of the loop to the next value.
You might start to learn LabVIEW by taking the free learning resources offered in the "Training resources" in the header of the LabVIEW board!
Read the chapter on loops and shift registers…