How to reverse the normalization function normc/normr?

14 ビュー (過去 30 日間)
kokin
kokin 2015 年 9 月 16 日
編集済み: Matt J 2015 年 9 月 16 日
I have used the function of "normr/normr" to normalize a matrix, but how can I reverse the normalization? Thank you very much!
  2 件のコメント
Image Analyst
Image Analyst 2015 年 9 月 16 日
What happened to the original matrix? Why did you lose it?
I don't have the normr() function. Please list which toolbox it's in in the Products section below.
kokin
kokin 2015 年 9 月 16 日
I didn't discarding the original data. I just want to know the way that how to reverse the normalized data using normc/normr.

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

採用された回答

Matt J
Matt J 2015 年 9 月 16 日
編集済み: Matt J 2015 年 9 月 16 日
If you haven't discarded the original data, there is nothing to restore. The "restored" matrix is the original one that you already have. If you plan to throw that data away, the best thing would be to save the row-wise (or column-wise) norms and use them when needed to undo normalization, e.g.,
A =
1 5 9 13
2 6 10 14
3 7 11 15
4 8 12 16
>> nr=sqrt(sum(A.^2,2)); %row-wise norms
>> B=bsxfun(@rdivide,A,nr) %same as B=normr(A)
B =
0.0602 0.3010 0.5417 0.7825
0.1091 0.3273 0.5455 0.7638
0.1493 0.3483 0.5473 0.7463
0.1826 0.3651 0.5477 0.7303
>> Arev=bsxfun(@times,B,nr) %reverse
Arev =
1.0000 5.0000 9.0000 13.0000
2.0000 6.0000 10.0000 14.0000
3.0000 7.0000 11.0000 15.0000
4.0000 8.0000 12.0000 16.0000

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeHypothesis Tests についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by