Info

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

speed up reading corresponding values from another matrix

조회 수: 1 (최근 30일)
Meh
Meh 2014년 12월 16일
마감: MATLAB Answer Bot 2021년 8월 20일
Hi I have a Matrices hQ=[200x2] and H[50000]. I want to find the values of hQ(:,2) from hQ(:,1) that correspond to H().It should be possible to find H(i) = hQ(i,1) but because of extra decimal places I have to give a tolerance. I have written the following code but it takes a lot of time, do you think of a better way of doing the same.
for i=1:length(H)
Q(i)=hQ(find(abs(hQ(:,1)-H(i))<0.0001,1),2);% find closest h value with tolerance of 0.0001m
end

답변 (0개)

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

태그

Community Treasure Hunt

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

Start Hunting!

Translated by