Can somebody tell me why I have this Warning by using this code

3 ビュー (過去 30 日間)
Walter Roberta
Walter Roberta 2012 年 12 月 17 日
D=imread('C:\Users\Users\Pictures\Doc3_files\Doc3_files\Capture.gif');
F=im2double(D);
symbols = unique(F(:));
counts = hist(F(:), symbols);
p = double(counts) ./ sum(counts);
r(p:q) = [y(1:i, j); eob];
count= count + i + 1; %and add to output vactor
F((count+1):end) = []; %delete unused portion of B
y.size=uint16([xm xn]);
y.numblocks = uint16(xb);
y.quality = uint16(quality * 100);
y.huffman = mat2huff(B)
Warning: Colon operands must be real scalars.
Undefined function 'y' for input arguments of type 'double'.
  2 件のコメント
Walter Roberta
Walter Roberta 2012 年 12 月 17 日
編集済み: Walter Roberta 2012 年 12 月 17 日
I'm trying to Compress an image by using Run Length coding and Huffman coding. Please would you like to help by showing me the right codes
Walter Roberson
Walter Roberson 2012 年 12 月 17 日
What was your thought that
r(p:q) = [y(1:i, j); eob];
might mean?

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

回答 (1 件)

Image Analyst
Image Analyst 2012 年 12 月 17 日
p is an array, so you can't do r(p:q) - it doesn't make sense. What are you wanting to do?

カテゴリ

Help Center および File ExchangeData Distribution Plots についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by