필터 지우기
필터 지우기

Matlab command window displaying weird

조회 수: 2 (최근 30일)
tusu
tusu 2013년 5월 31일
Hello,
When I am using this command for to see the prob of occurrence
P = histc(B(:,i),0:255)/length(B(:,i));
Where i varies from 1 to 65 and each B contains 2560 character (ASCII)so ranging from 0 to 255
but when I am using
[(0:255).' P(:)]
I am about see prob of occurrence of each 0 to 255 ASCII characters but it's showing in this way
0 0.000035156250000
0.010000000000000 0.000042968750000
0.020000000000000 0.000042968750000
0.030000000000000 0.000027343750000
0.040000000000000 0.000058593750000
0.050000000000000 0.000058593750000
0.060000000000000 0.000039062500000
.................
2.540000000000000 0.000066406250000
2.550000000000000 0.000042968750000
Why 2.55 not 255?
  댓글 수: 1
Image Analyst
Image Analyst 2013년 5월 31일
Show the line of code where you actually use this: [(0:255).' P(:)], because you can't have that as an output of histc() because your first output argument is a constant, not a variable. And P has a different meaning when it's the second output argument than when it's the first.

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

답변 (1개)

Walter Roberson
Walter Roberson 2013년 5월 31일
Give the command
format long g
before showing the output.

카테고리

Help CenterFile Exchange에서 Scripts에 대해 자세히 알아보기

태그

아직 태그를 입력하지 않았습니다.

Community Treasure Hunt

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

Start Hunting!

Translated by