the (if statement) condition happens only ones but I want to repeat this if (F Zero) is still not empty
조회 수: 3 (최근 30일)
이전 댓글 표시
if (~isempty(F_Zero)) %There is Zeros (not empty)
W(:,F_Zero) = []; % Remove the columns of W
HT(F_Zero,:) = []; % Remove the rows of HT
W_bar = W./sqrt(sum(abs(W.^2),1));
D_Matrix = HT*W_bar; %Diagonal Matrix
D_Square = (abs(diag(D_Matrix))').^2; % Channel gains
P = waterfill(Pt,Pn./D_Square);
F_Zero=find(~P);
else
% do Nothing
end
댓글 수: 2
채택된 답변
KSSV
2021년 6월 8일
If you are looking for a loop, you may go for while loop.
while ~isempty(F_Zero)
% Do what you want
end
댓글 수: 0
추가 답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Loops and Conditional Statements에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!