There are only two ways to tell somebody thanks: Kudos and Marked Solutions Unofficial Forum Rules and Guidelines "Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
Hlo frds,i am having a 2d array with 5 rows and 4 columns which is evenly distributed,1st column should be x-axis and remaining 3 columns with 3 different plots on same graph,can any one explain?
You might have better luck if you asked your question in the LabVIEW discussion forum instead of spamming people with PMs and making unrelated posts in this blog.
There are only two ways to tell somebody thanks: Kudos and Marked Solutions Unofficial Forum Rules and Guidelines "Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
Why would a FOR loop matter? The action is done at the same time as the check, so it would come up with the same answer as long as N was more than 3.
There are only two ways to tell somebody thanks: Kudos and Marked Solutions Unofficial Forum Rules and Guidelines "Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
During third iteration array size is 2 so the condition is true and loop should stop execution and output should be {8,9}. As I learned for loop will check condition and then execute code. But I tested the code in the third iteration output is {9}. Could you please explain why for loop is executing even though stop condition is true in the third iteration.
"As I learned for loop will check condition and then execute code."
That only works on the iteration count. The conditional terminal is checked at the end of the loop iteration.
After the first iteration, the array in the shift register is {6,7,8,9,10}. After the second iteration, the array is {8,9}. But the size comparison was done with the array before it was shrank, making the size 5, which is more than 3, so the stop condition is FALSE. 2 iterations is still less than our 3, so we move on to a third iteration. Now the size comparison will state 2 (again, before the array was shrank), which is less than 3, so the stop condition will be TRUE (not that it matters since N is 3, which will make the loop stop here). But the rest of the code in the loop must still complete, which takes the array down to {9}. So the final value of the array that comes out of the shift register is {9}.
There are only two ways to tell somebody thanks: Kudos and Marked Solutions Unofficial Forum Rules and Guidelines "Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5