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: 

Recursion and double integration

I'd need to write a program that performs a double integration. I'd like to
use the function integration (Integration.vi) routine and not the numerical
integration. This calculation requires a recursive call to the integration
routine; e.g., int(int(f(x,y,), x=0..a, y=0..b). I can't figure out how to
perform this type of recursion in LabVIEW.

If you have a VI to perform double integration, I'd love to see it. Any
general info on recursion strategies would also be helpful.

Thanks,
Jim
0 Kudos
Message 1 of 8
(4,790 Views)
I don't know if this is possible, but you could give it a try. Wire your function to a shift register in a for loop, wire N (iteration number) with 2, then wire the shift register to the integration vi and the output to the shift register output, this way, you get the first integral in the first iteration, and wire this to the integration again in the second iteration getting the second integral at the output.
Hope this can be done
Message 2 of 8
(4,788 Views)
Jim,
In addition to Gorka's good response, I stumbled on a neat recursion/iterative vi (from Valiant technologies) today which might fit with ideas for your strategies (if not, than its info at least).
Upon going to the link, its the last vi on the list (fulldir.zip)

Good Luck, Doug

http://www.val-tech.com/software/labview/srccode.html
0 Kudos
Message 3 of 8
(4,788 Views)
it's been awhile since you posted this but here's my take on the subject of double integration in labview. if you want symbolic/analytic solution to your double integral labview is not the right choice unless you have an add-in from Maplesoft, the best symbolic manipulator I've seen. If you want a numerical solution, as most measurement problems are, then the Mathematic VI's that ship with the full version of labview are an excellent choice. There're fast because they're written in C which you can access through a Call Library Function Node. Forget about a MATLAB M-file and then running it from within LV using the MathScript, is not robust enough to handle such problems. The trick in using the double integration VI's is to set up the 2D matrix correctly. I'd recommend you get yourself a good numerical methods textbook that covers integration in detail. To get you started, one of the many flavors of Simpson's Rule converges rapidly with very good overall accuracy. good luck.

otman@otmanestrada.com
0 Kudos
Message 4 of 8
(4,553 Views)

Dear Sir,

I would like to know about double integral. The value which i have in MATRIX form, further i want to go for double integral.

Please give some idea so that i could solve my problem.

 

Thanking you

 

 

Best Regards,

Roshan kumar

0 Kudos
Message 5 of 8
(3,424 Views)

Roshan kumar,

 

This thread is mostly 12 years old and most of the participants have not logged in to the Forums for years.  It would be better for you to start a new thread and mention that you had read this one.

 

When you post a question, please be as specific as possible. What is the size of your matrix? Is it a LabVIEW Matrix data type or just an Array data type? What is the specific mathematical expression for the integration you want to perform? What will you be doing with the data after the integration? Do you have very many integrations to do or do they need to be done very fast? If so, how many and how fast?

 

What have you tried? Specifically, in what way were the results different from what you expect? Report any error messages or codes you received.  Please post your code including some typical data for which you know what the expected result is.

 

Lynn

Message 6 of 8
(3,409 Views)

Dear Sir,

Thank you very much for your suggestions,and according to you i am sending the file along with this e-mail which i have to process further. The output of TIME FREQUENCY SPECTROGRAM i.e TFD(t,f). Further, i want to go for software processig is double integration as shown in attatched file by arrow. TFD(t,f) is in array form,but in labview there is provision to convert in MATRIX. Please guide me how will i go for double integration of TFD(t,f).

 

Thanking you

 

Best Regards,

Roshan Kumar

0 Kudos
Message 7 of 8
(3,390 Views)

Roshan Kumar,

 

1. Many particpants on the Forum will not open files in .docx format for security reasons.  Create an image in .png or .jpg format an insert it directly into the message or attach the .vi file.

 

2. Where did you get the Time Frequency Spectrogram VI? Is it part of some toolkit?  I do not have it in my version of LV.

 

3. I cannot tell from the image but most Express VIs outputs are Dynamic Data Type, not arrays or matrix.  Also I do not see any arrow.

 

What are you trying to accomplish by the double integration? Can you post a mathematical description of the exact formula you are trying to implement or a link to a site which explains it?

 

Lynn

0 Kudos
Message 8 of 8
(3,367 Views)