How to use the function regexp?
조회 수: 1(최근 30일)
표시 이전 댓글
I am working out problems from Cody and I have seen many top solutions are solved using 'regexp' funciton. Can anyone please explain me the functionality of regexp?
I have already read the matlab documents of this fucntion but still I am unable to understand certain things. For example, in problem 838 of 'Check if number exists in vector' where we need to check that number 'a' is present in the vector. Hence, if a = 2 and b = [1 2 3 4] and when use the command y = any( b(:) == a) it gives me logical output as 1. However, when I try the command regexp '' '(/@ y = any( b(:) == a))' it throws me an empty matrix as the result, why is this?
I don't get it where I am going wrong..?
Thanks in advance!
답변(0개)
참고 항목
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!