MATLAB Answers

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

조회 수: 48(최근 30일)
Kaloyan 4 Nov 2013
댓글: Kaloyan 4 Nov 2013
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?

  댓글 수: 0

로그인 to comment.

채택된 답변

Image Analyst
Image Analyst 4 Nov 2013
Use imresize() and mat2gray().

  댓글 수: 1

Kaloyan 4 Nov 2013
Thank you very much :) It works!

로그인 to comment.

추가 답변(0개)

이 질문에 답변하려면 로그인을(를) 수행하십시오.

Translated by