Info
이 질문은 마감되었습니다. 편집하거나 답변을 올리려면 질문을 다시 여십시오.
Need to compare one value to an array that has 1000 decimal values
조회 수: 1 (최근 30일)
이전 댓글 표시
I have a=0.3, I have a vector jki=0:0.00065:0.65 (its a 1x1001 vector). I want to compare each value of jki to a, if that is true, display something. I've tried searching online but don't really understand still how to do it. This is what my guess would be for the code, but it doesn't work:
for k=1:size(jki)
if jki(k)==a
disp('something');
end
end
댓글 수: 1
Walter Roberson
2018년 9월 29일
What is the difference between this and your earlier https://www.mathworks.com/matlabcentral/answers/421321-test-value-equality-within-a-range-of-values ?
답변 (0개)
이 질문은 마감되었습니다.
참고 항목
제품
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!