How to reverse the normalization function normc/normr?

14 次查看(过去 30 天)
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 个)

Community Treasure Hunt

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

Start Hunting!

Translated by