필터 지우기
필터 지우기

Setting a starting distance value in pdist

조회 수: 2 (최근 30일)
med-sweng
med-sweng 2014년 9월 9일
댓글: med-sweng 2014년 9월 9일
Hi!
I'm using pdist to find the distance between two matrices. Those matrices change for every run of the program.
My question here is, what would be a starting value for the distance value, such that that value will be considered the minimum distance value.
After I run the first iteration, I want to compare the new distance result with that initial minimum distance set earlier, such that, if the new distance is smaller, it will be considered the minimum, and then the program will go to the next iteration.
The program will stop if the new calculated distance is not less than the minimum.
So, the issue here is, what would be the starting minimum for the distance, provided that for instance, after running one iteration of the program, a value I obtained for pdist was 50.5292.
Thanks.

답변 (1개)

Adam
Adam 2014년 9월 9일
Can't you just initialise to Inf? Am I missing some subtlety in the question?
  댓글 수: 1
med-sweng
med-sweng 2014년 9월 9일
Thanks for your reply. What do you just mean by "Inf"?

댓글을 달려면 로그인하십시오.

카테고리

Help CenterFile Exchange에서 Statistics and Machine Learning Toolbox에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by