How to scale matrix size from A x B to M x N

23 ビュー (過去 30 日間)
Kaloyan
Kaloyan 2013 年 11 月 4 日
コメント済み: Kaloyan 2013 年 11 月 4 日
Hello! I have a matrix with size X by 752 elements. The X size (number of rows) is unknown and depends on the gathered data. The data is a line with 752 values from 0 to 255. So when I gather the data, I need to rezise the matrix to a (X*0.125) by (752/somenumber) and the values from 0-255 to 0-100. The final data is shown as an image with imshow(data).
Can you tell me is this scaling possible, because I had no success using scale() and other methods?

採用された回答

Image Analyst
Image Analyst 2013 年 11 月 4 日
Use imresize() and mat2gray().
  1 件のコメント
Kaloyan
Kaloyan 2013 年 11 月 4 日
Thank you very much :) It works!

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

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeMatrix Indexing についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by