Adding a function to the distribution of a matrix.

조회 수: 2 (최근 30일)
Tim
Tim 2012년 10월 15일
Hey all,
I've got a matrix (H) in this shape:
1 1 1 1 1 1
0 1 1 1 1 1
0 0 1 1 1 1
0 0 1 1 1 1
0 0 0 1 1 1
0 0 0 1 1 1
0 0 0 0 1 1
0 0 0 0 1 1
0 0 0 0 0 1
0 0 0 0 0 1
Now I want the vertical distribution to follow a Gaussian function, where the sum of a column = 1.
By hand, it'll look something like this:
1.0000 0.5000 0.1200 0.1000 0.0500 0.0300
0 0.5000 0.3800 0.1667 0.1050 0.0500
0 0 0.3800 0.3700 0.1750 0.1000
0 0 0.1200 0.3700 0.3250 0.1700
0 0 0 0.1667 0.3250 0.2800
0 0 0 0.1000 0.1750 0.2800
0 0 0 0 0.1050 0.1700
0 0 0 0 0.0500 0.1000
0 0 0 0 0 0.0500
0 0 0 0 0 0.0300
This is ofcourse a very bad approximation, but I hope you get the idea. How should I do this? I only get as far as giving them all an equal amount:
COLUMN=[];
for count=1:6
H(:,count)/sum(H(:,count));
COLUMN=[COLUMN, ans];
end
H=COLUMN;
Can someone perhaps give me some advice on how to add a (gaussian) function to a achieve a certain distribution? Thanks!
Tim

답변 (0개)

카테고리

Help CenterFile Exchange에서 Creating and Concatenating Matrices에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by