취소
다음에 대한 결과 표시 
다음에 대한 검색 
다음을 의미합니까? 

subtracting and comparing array elements

해결 완료!
솔루션으로 이동

Hi,

I am trying to subtract first element with other elements of array to check whether the results is more than abs.5 or not. Then i want to get this ROW number of that element.

Ex: array is 1,1,2,3,4,4,5,6,7. i will check 1-1 > 5? else 1-2 > 5 else 1-3> 5 until.... 1-6 > 5.

now i want to save/get this ROW number of 6 i.e 8 to use it somewhere. and stop this subtraction process.

 

How can i?

0 포인트
1/13 메시지
7,716 조회수
0 포인트
2/13 메시지
7,712 조회수

Hi Blokk,

 

Thanks for your reply. I did gone through some basics and even tried few solutions.

But am struck at finding the ROW when the case is true and get out of the loop/exit/stop.

 

Any help is appreciated.

0 포인트
3/13 메시지
7,694 조회수

your requirement states "|1-6|>5 == success", but that means you might want a greater-equal comparison.

find-index.png

 

btw .. you should talk about index/element-at, a row makes sense only in a multi dim array


If Tetris has taught me anything, it's errors pile up and accomplishments disappear.
4/13 메시지
7,688 조회수

You get help more likely if you attach your VI with comments. Show us what you find difficult, or what is not clear. Try to break the home work into smaller parts, and first solve/understand these, before putting everything together.

Do not expect that someone gives you here a complete solution. But if you give a good question, you can get a good answer 😉

Some hints: do you understand how While and For loops work? Do you understand Shift Registers? Did you get familiar with the Array functions? Do you understand Data Flow in LabVIEW?

If your answer is NO for some of these questions, then you should learn a bit more the basics...

0 포인트
5/13 메시지
7,686 조회수

sorry .. i like doing homework sometimes 😉

 


If Tetris has taught me anything, it's errors pile up and accomplishments disappear.
0 포인트
6/13 메시지
7,683 조회수

@jwscs wrote:

your requirement states "|1-6|>5 == success", but that means you might want a greater-equal comparison.

find-index.png


sjscs: Please do not solve home works, this forum is not for that.

0 포인트
7/13 메시지
7,682 조회수
솔루션
승인자 sacsk123

ai.png

"If you weren't supposed to push it, it wouldn't be a button."
8/13 메시지
7,631 조회수

Thanks Paul.

yes this what i was looking for. Search and find the array index when it is True worked for me.

i was struck at how to handle the array of T,F booleans.

 

0 포인트
9/13 메시지
7,601 조회수

This is mainly a performance questions. I have a master list of all users existing in a String array AllUids. I also have a list of all end dated users existing in a String array EndUids.

0 포인트
10/13 메시지
7,596 조회수