09-24-2012 01:54 AM
I wanted to calculate the continuity in data array. And I used the following logic
C=0;
J=0;
A=[1 2 3 4 10 11 12 15 16 19];
B()=0;
For(i=0,i<=size of A ,i++)
{
If [A(i+1)-A(i)==1]
C=C+1;
Else
{
B(J)=C;
J=J+1;
C=0
}
}
My output should be
3
2
1
0
I tried to build this in Labview but i am facing problem if the “else” part of logic.
Kindly help me,
thanks in advance
Solved! Go to Solution.
09-24-2012 01:59 AM
Hi Rajesh,
Can you please explain what actually you are trying to achieve without providing your text based code?
09-24-2012 02:05 AM
Hi Rajesh,
Please check the attached vi. I tried to build the logic you explained.
09-24-2012 02:07 AM
Hi Rajesh,
Please check the attached vi. I tried to build the logic you explained.
09-24-2012 02:26 AM
@danil33 wrote:
Hi Rajesh,
Can you please explain what actually you are trying to achieve without providing your text based code?
It seems to me a kind of homework application 🙂
09-24-2012 04:14 AM
Hi Rajesh,
Use this vi to get all the continuities for your given data array.
09-25-2012 05:56 AM - edited 09-25-2012 05:58 AM
Thanks a lot for your support. . its working. .