using find function
조회 수: 6 (최근 30일)
이전 댓글 표시
im having a problem to find the correct value that i desire. im trying to plot graph for beamwidth for uniform array. but, the problem is that when i use the find function to find the angles which has -3dB gain, there is an error. so, i rounded up the -3dB angles to make it easy to use the find function. then, the rounded is not accrurate and consist some undesired value. example: p=-3.0041 -3.2098 -3.2000. I rounded up the value and it makes the value to become p= -3 -3 -3. hence, it contains some undesired value and makes it complicate to plot the graph. can anyone help to overcome this problem.
댓글 수: 0
답변 (2개)
Grzegorz Knor
2012년 2월 22일
If I understand you correctly, try to round your vector roughly this way:
round(p*100)/100
or use find something like that:
find(abs(p-3)<0.001)
참고 항목
카테고리
Help Center 및 File Exchange에서 Graph and Network Algorithms에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!