What's wrong with tied ranks?

5 ビュー (過去 30 日間)
Antonio Trujillo-Ortiz
Antonio Trujillo-Ortiz 2016 年 2 月 4 日
回答済み: dpb 2016 年 2 月 4 日
Hi all,
If you have the data vector:
A=[ -2.4 -7.4 -1.4 -0.4 0.6 -6.8 -5.8 -4.8 -4.8 -3.8 -5.0 -4.0 -5.0 -6.0 -6.0 -5.4 -3.4 -4.4 0.6 1.6];
Why when you call the function t=tiedrank(A) you get t=[15 1 16 17 18 2 5 9.5 9.5 13 7.5 12 7.5 3.5 3.5 6 14 11 19 20];
instead, t=[15 1 16 17 18.5 2 5 9.5 9.5 13 7.5 12 7.5 3.5 3.5 6 14 11 19 20]; ?
Notice the problem with the ordered value 0.6
I would appreciate any hint on this. Thx.
  1 件のコメント
Antonio Trujillo-Ortiz
Antonio Trujillo-Ortiz 2016 年 2 月 4 日
Sorry. I make a transcript mistake. Last vector must said,
instead, t=[15 1 16 17 18.5 2 5 9.5 9.5 13 7.5 12 7.5 3.5 3.5 6 14 11 18.5 20]; ?
Thx again.

サインインしてコメントする。

回答 (1 件)

dpb
dpb 2016 年 2 月 4 日
Answered in identical thread on newsgroup...short story is your two 0.6 values are similar-enough to print out the same to precision in command window but aren't identically equal.

カテゴリ

Help Center および File ExchangeGet Started with MATLAB についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by