필터 지우기
필터 지우기

Info

이 질문은 마감되었습니다. 편집하거나 답변을 올리려면 질문을 다시 여십시오.

Some problem in computation of matrix operations?

조회 수: 1 (최근 30일)
RS
RS 2013년 8월 29일
마감: MATLAB Answer Bot 2021년 8월 20일
I have a matrix of 1024*966 for this matrix I want to compute mean and want to scale after this ? what is meaning of this and want to improve rsult by doing this but how can I? Final result will be nearly equal to matrix of 1024*966.
  댓글 수: 2
Azzi Abdelmalek
Azzi Abdelmalek 2013년 8월 29일
you said: "What is meaning of this" What does that mean?
Walter Roberson
Walter Roberson 2013년 8월 29일
Are you trying to "center and rescale" for the purposes of improving the condition number ?

답변 (1개)

Image Analyst
Image Analyst 2013년 8월 29일
You can do
meanValue = mean(yourMatrix(:));
scaledMeanValue = scaleFactor * meanValue;
The meaning of this is so obvious that I don't know what to say other than it takes the mean and scales it - not sure why you even asked. I don't really know why you say you want to improve upon it. Of course I did it in two lines but if you never need the original mean value every, you can do it all in one line - that's about the only improvement I can possibly think of.
Of course the final result will be nothing like the original matrix and in fact is not even a matrix at all - it's a scalar, so I don't know why you assert that. If you do want a matrix where you want the mean inside a sliding window you can use conv2():
smoothedImage = conv2(double(yourMatrix), ones(3)/9, 'same');
but again, it will not be nearly equal to your original matrix. So, bottom line, I'm having a really hard time trying to understand what you're asking.

이 질문은 마감되었습니다.

Community Treasure Hunt

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

Start Hunting!

Translated by