필터 지우기
필터 지우기

Info

이 질문은 마감되었습니다. 편집하거나 답변을 올리려면 질문을 다시 여십시오.

I need to know what's the problem with this code

조회 수: 1 (최근 30일)
wisam kh
wisam kh 2018년 9월 2일
마감: MATLAB Answer Bot 2021년 8월 20일
Hello I need to know what's the problem with this code
% tedata contain 20 cells
% trdata contain 60 cells
for j=1:length(tedata)
for i=1:length(trdata)
y=cell2mat(tedata(j));
x=cell2mat(trdata(i));
similarity = sqrt(sum((x - y) .^ 2));
if similarity>180
similarity=similarity-360;
elseif similarity<-180
similarity=similarity+360;
end
kk(i)=similarity;
end
[result indxofmin] =min(kk);
but it return the value of similarity at first step [similarity = sqrt(sum((x - y) .^ 2)); ] not after the condition
  댓글 수: 4
Image Analyst
Image Analyst 2018년 9월 8일
Another major problem with it is that there are not enough comments in it. That would not be acceptable in our company.
wisam kh
wisam kh 2018년 9월 10일
Ok thank you.

답변 (0개)

이 질문은 마감되었습니다.

Community Treasure Hunt

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

Start Hunting!

Translated by