필터 지우기
필터 지우기

how to craet the same function but without loop

조회 수: 1 (최근 30일)
amjad hammad
amjad hammad 2021년 12월 4일
댓글: amjad hammad 2021년 12월 4일
hi can anyone tell me how i can change this uction to not loop with same result
function Xne = decode( H, Zn0, nIter, verbose )
[ M, N ] = size( H ) ;
ZMN = zeros( M, N ) ;
LMN = zeros( M, N ) ;
for m = 1 : M
ZMN(m,:) = Zn0(:); %must be same like this but without using any loops
end

답변 (1개)

Voss
Voss 2021년 12월 4일
Here is one way:
function Xne = decode( H, Zn0, nIter, verbose )
[ M, N ] = size( H ) ;
LMN = zeros( M, N ) ;
ZMN = repmat(Zn0(:).',M,1);

카테고리

Help CenterFile Exchange에서 Startup and Shutdown에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by