Benchtop Measurement and Test
Distributed Measurement and Control
High-Performance Test
Systems Engineering Software
Perspectives showcases how NI sees what’s next in the world of test and technology.
You can request repair, RMA, schedule calibration, or get technical support. A valid service agreement may be required.
Provides support for NI data acquisition and signal conditioning devices.
Provides support for Ethernet, GPIB, serial, USB, and other types of instruments.
Provides support for NI GPIB controllers and NI embedded controllers with GPIB ports.
02-26-2019 04:35 AM - 편집 02-26-2019 04:36 AM
아래 그림에는
A : 5개
B : 2개
C : 1개
D : 2개
E : 3개
가 있습니다. (순서 무작위)
아래 배열에서 각 원소의 갯수를 프로그램적으로 카운트하고싶은데
제 생각으로는 A,B,C,D,E 각각 FOR문 돌려서 카운트 해야되는거 같은데 더 쉬운 방법 없을까요
임의의 원소가 들어와도 중복원소 카운트되도록이요(꼭 A,B,C,D아닌 문자가 들어올 경우도 있습니다)
예전 마이랩뷰있을 때 본거같은데 이제 접속이안되서 ...ㅠ
해결되었습니다! 솔루션으로 이동.
날짜: 02-26-2019 06:50 PM
안녕하세요
간단한 방법으로는 String 배열과 찾고자 하는 String 값 (ex: a, b ...) 각각에 대하여 비교를 하면 결과는 Array 각 element에 대한 비교 결과를 불리언 array 로 출력합니다. 불리언 값을 0/1로 맵핑 후 해당 값을 더하면 참인 String element의 수가 출력이 될 것입니다. 아래의 간단한 코드를 참고해주시기 바랍니다.
What do you need our team of experts to assist you with?
Thanks!
We'll be in touch soon!