09-02-2018 07:58 AM
Hi guys,
I'm creating a program for the evaluation of the dynamic behavior of supercapacitor and to achieve my goal I have a really long array with thousands of point.
To reshape this array I create many submask using the Labview blocks of "reshape array" and so on but to do that for all points is quite a mess.
The process that I have to follow is this:
Split the main array in subgroups of 100 points, take the mean value of this 100 points and finally create a new array made of mean values.
Could you help me to do this with only one mathscript instead of hundreds of submask and stuff like that?
09-02-2018 10:33 AM - edited 09-02-2018 11:52 AM
Can you reduce your VI to a simple example, then explain what the output should look like?
09-02-2018 10:46 AM
You have a 1D array with many points, and want to form a new array consisting of the mean of each set of 100 points. You can do the entire thing with a few LabVIEW functions and a For loop.
You should be able to write this code from the above description. I hope you do so before someone thoughtlessly posts the code.
Bob Schor
09-02-2018 11:03 AM
Thank you so much for your reply, I'm going to try to do like you say because i think it's really a good idea! Thanks again for now!
Simone Guidi
09-02-2018 11:07 AM
09-02-2018 11:50 AM
@Bob_Schor wrote:
You should be able to write this code from the above description. I hope you do so before someone thoughtlessly posts the code.
I did not see Bob's message, but I don't think my post was thoughtless. It contained sufficiently obscure modifications that will allow you to learn about datatypes and array operations. In fact if you put in some effort to fully understand it, it will put you on a fast track to become a better programmer. You will also appreciate how elegant and powerful LabVIEW is! 😄 Enjoy!
09-02-2018 07:00 PM
Anything by Altenbach is never thoughtless, but thoughtful. Not all posters, however, are as knowledgable and generally helpful as he -- as I generally try to do, he also is interesting in teaching others about LabVIEW, not showing how clever he is.
Bob Schor