[問題] 矩陣-統計圖已回收

看板MATLAB作者 (kuroro...)時間15年前 (2010/09/09 16:49), 編輯推噓0(000)
留言0則, 0人參與, 最新討論串1/1
目前是matlab的新手 之前寫過一點C 最近因為要畫圖而開始用matlab 目前遇到一個問題 是這樣的 我有一個 Lo 是我可以設定的參數 範圍是 0 ~ 1 根據我給的 Lo 0 0.1 0.2 ~~0.8 0.9 1 會有不同的 normal distribution 而我設定Lo 之後會跑出一個 normal distribution 的 matrix 我要畫 Lo = 0 0.1 0.2 ~~0.8 0.9 1 的圖 橫坐標 是矩陣的 元素 縱座標是 pdf 該如何呢??? 我要的 hist 要曲線 不要直條圖 附上我產生 normal distribution 的 matrix 的 code clc; clear all; close all; ns = 500; nl =400; %number of samples and lines %--------------- lo = 0.5; %paramater %--------------- FrAddNo = zeros([nl ns]); %fringe add noise 's matrix T = [[1 abs(lo)];[abs(lo) 1]]; %coherence matrix %--- S1_I = normrnd(0,0.5,nl,ns); S1_Q = normrnd(0,0.5,nl,ns); S2_I = normrnd(0,0.5,nl,ns); S2_Q = normrnd(0,0.5,nl,ns); %--- for j=1:nl for i=1:ns %--- V = [complex(S1_I(j,i),S1_Q(j,i)) complex(S2_I(j,i),S2_Q(j,i))]; %--- [Z,Lamda] = eig(T); Lamda_h = sqrt(Lamda); U = Z * Lamda_h * V'; %--- %--- U_cplx = U(1)*conj(U(2)); U_pha = angle(U_cplx)*(180/pi);% + fringe(j,i); %+180;%Data_pha(x,y) + pi ; FrAddNo(j, i) = U_pha;%phase *(180/pi); end end -- _ _ | | | | | |__ _ _ _ __ | |_ ___ _ _ | '_ \| | | | '_ \| __/ _ \ '_| | | | | |_| | | | | || __/ | |_| |_|\__,_|_| |_|\__\___|_| ﹒﹒﹒ -- ※ 發信站: 批踢踢實業坊(ptt.cc) ◆ From: 211.76.254.12
文章代碼(AID): #1CY9-orZ (MATLAB)
文章代碼(AID): #1CY9-orZ (MATLAB)