How to make normalised frequency distribution plot?
8 ビュー (過去 30 日間)
古いコメントを表示
I have two 80*80 matrix. I would like to plot normalised frequency plot. So first I tried to normalise the 80* 80 grid with this code: A= per_monsoon_postmon; (A is my 80*80 matrix) A = rand (80,80); minA = repmat(min(A), [size(A, 1), 1]); normA = max(A) - min(A); normA = repmat(normA, [length(normA) 1]);
normalizedA = (A - minA)./normA;
But I don't this code has given me desired result, as Grids with NaN values also has a number in it. for eg. earlier grid 1*1 is NaN now it is 0.8340. Could you please help me how to normalise the 2d matrix and then plot frequency distribution plot.
0 件のコメント
回答 (1 件)
Rishabh Rathore
2018 年 5 月 30 日
Here's what I understand from your question, you want to normalize A and after normalization the NaNs gets replaced by a number.
From your code, I can see that you are reassigning A using rand(). rand() itself does not creates any NaN, so there are no NaNs in A to begin with and your A is not per_monsoon_postmon rather it is rand(80,80) when it gets normalized.
And your operations to normalize doesn't change NaNs (I tried on Matlab).
0 件のコメント
参考
カテゴリ
Help Center および File Exchange で Geographic Plots についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!