답변 (3개)

KSSV
KSSV 2021년 4월 12일

0 개 추천

Note that you are comparing two floating point numbers and such numbers cannot be comapred using ==. Follow
tol = 10^-5 ;
idx = abs(val1-val2)<tol
Steven Lord
Steven Lord 2021년 4월 12일

0 개 추천

Two numbers that are displayed the same may not represent the same stored value. See this Answers post for more information about floating point numbers.

카테고리

도움말 센터File Exchange에서 Resizing and Reshaping Matrices에 대해 자세히 알아보기

제품

질문:

2021년 4월 12일

댓글:

2021년 4월 12일

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by