Strcat and HuffMan Word Code & GUI
조회 수: 1 (최근 30일)
이전 댓글 표시
Hello everyone,
i have a problem with applying something on matlab which is:
for nn=1:a
stri=character(nn);
stri=strcat(stri,':');
stri=strcat(stri,num2str(probabilities(nn)));
stri=strcat(stri,':')
stri=strcat(stri,*My Problem In Here*)
stri=strcat(stri,':');
end
what i want to do is after getting the probability for each alpha and numebers and the spaces and the codeword i want to put them beside each other.
For example:
A:0.342:001100
D:0.432:011011
and so on.....
but when im trying to do that everytime its give me
A:0.342:' '
D:0.432:' '
without the codeword
what i have to do im kinda lost and i have to handout this project after tomorrow :S
thank you....
if there is any more information please ask! :)
댓글 수: 1
Walter Roberson
2012년 12월 21일
Please show us your real code line that you represented here as
stri=strcat(stri,*My Problem In Here*)
채택된 답변
mohamed
2012년 12월 21일
댓글 수: 1
Walter Roberson
2012년 12월 21일
You can use figure() to open a new window. In that new figure, create a uicontrol() of 'Style', 'edit', and 'Enable', 'disabled', and set its 'String' property to the text you want.
추가 답변 (4개)
Walter Roberson
2012년 12월 21일
Change
stri=strcat(stri,codewords(nn))
to
stri=strcat(stri,char('0' + codewords(nn)))
댓글 수: 0
참고 항목
카테고리
Help Center 및 File Exchange에서 Large Files and Big Data에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!