Waterfilling algorithm
% the water-filling process
% x: a vector with each component representing noise power
% P: total power
%
% The returned vector p maximizes the total sum rate given by
% sum(log(1 + p./x)), subject to the power constraint sum(p)== P, p>=0.
%
% The return a vector p also minimizes
% norm(p+x)
% subject to the constraints
% sum(p)==P; p>=0
%
%
% The second output "level" is the water level
%
% Sample usage:
% Three parallel Gaussian channels with noise powers 1, 2 and 3.
% The total power is 2.
%
% >> waterfill([1 2 3],2)
% ans =
% 1.5000 0.5000 0
%
%
% Author: Kenneth Shum, 2010
%
% Reference:
% T. M. Cover and J. A. Thomas, "Elements of Information Theory", John Wiley & Sons, 2006
Cita come
Kenneth Shum (2026). Waterfilling algorithm (https://it.mathworks.com/matlabcentral/fileexchange/28022-waterfilling-algorithm), MATLAB Central File Exchange. Recuperato .
Compatibilità della release di MATLAB
Compatibilità della piattaforma
Windows macOS LinuxCategorie
Tag
Scopri Live Editor
Crea script con codice, output e testo formattato in un unico documento eseguibile.
| Versione | Pubblicato | Note della release | |
|---|---|---|---|
| 1.0.0.0 |
