LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to count double sum in labview

Solved!
Go to solution

Hi all. Please help me to solve my problem...

 

I have to count a double sum by the formula which I've attached with my post. Datas have been attached also.

I did my version of solution, but it didn't work... Please help me.

 

Thank you sooooooooooooooo much in advance.

 

Waiting for replies. 

Download All
0 Kudos
Message 1 of 27
(5,100 Views)

I'm a little confused about what you're trying to do.

 

Is the result of your sum a scalar or do you want to have a function which calculates your sum as a function of x?

 

Since it looks like you're trying to graph your result, it looks like you're trying for the latter.

0 Kudos
Message 2 of 27
(5,068 Views)

Assuming your Express VIs are set up like you want them, the following should calculate the sum.

Optical sum.png

 

 

0 Kudos
Message 3 of 27
(5,063 Views)

Taki1999, first of all, I would like to thank for your reply and for example. I've tried but it is didn't work, beacuse N is not wired.

 

And about your question. I want to get function of sum as a function of x. In other words, I want to have each value of sum, which will correspond to each value of x during for-loop. After that, I want to have graph which will present dependence of x from sum...

 

Thank you in advance. 

0 Kudos
Message 4 of 27
(5,049 Views)

Sorry, Taki. After controlling N, it works 🙂 Thank you very much.

 

Please, give me the way of solution of my problem that I've written in the previous post. 

0 Kudos
Message 5 of 27
(5,046 Views)

I think this should do what you want.  You might want to review Auto-Indexing.

This could also be simplified by including your xm generation in the xm placeholder loop.

Optical sum2.png

0 Kudos
Message 6 of 27
(5,029 Views)

The problem and the above solutions don't make a lot of sense. This is a very simple problem.

 

  • Why is F an array? Isn't it a scalar?
  • There are only three relevant arrays: Xm(j) (which you generate in a loop), alpha(i), and lamda(i).
  • Their sizes determine the iteration count for the various sums.
  • Isn't the result a simple number? Why do you have an xy graph?

Please attach your VI once more and make sure that the alpha and lamda arrays as well as F contains typical data. Make current values the default before saving the VI. 

0 Kudos
Message 7 of 27
(5,015 Views)
Probably have to wait on the OP for real answers, but my interpretation is provided below. 

 


altenbach wrote:

 

The problem and the above solutions don't make a lot of sense. This is a very simple problem.

 

  • Why is F an array? Isn't it a scalar?
  •    I interpreted F0 as a function of lambda_i so indirectly F is also an array.
  • There are only three relevant arrays: Xm(j) (which you generate in a loop), alpha(i), and lamda(i).
  • Their sizes determine the iteration count for the various sums.
  • Isn't the result a simple number? Why do you have an xy graph?
  • I asked OP about this and I think he clarified in Message 4.

Please attach your VI once more and make sure that the alpha and lamda arrays as well as F contains typical data. Make current values the default before saving the VI. 

OP's Excel sheet has input data but without expected results, there's not really much to be done with it.


I also agree that there's probably much simpler ways to accomplish the OP's goals.  My snippets were just incremental nudges on the OP's vi.

0 Kudos
Message 8 of 27
(5,002 Views)

See if something like this would work. The result looks weird, though.

 

 

0 Kudos
Message 9 of 27
(4,999 Views)

Thank you so much for your replies. Sorry, I'm late because of my internet connection...

 

It is not necessary to have the value of lambda...(I attached it just for clearity). F is array which is correspond for each value of lambda and alfa. And about XY graph. It is necessary for havinf function sum from x. It means that I must know each value of sum for EACH x in loop (from 450 to 0 with step 0.5). For example, when x=450, count sum, then count sum for x=445.5 and so on... So we will have graph which will show what value have sum for each x...

 

Yhank you very much and once more sorry...

0 Kudos
Message 10 of 27
(4,985 Views)