You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

10 lines
154 B
Matlab

function w=pad_to_make_odd(w)
[n,m,l]=size(w);
if n==2*floor(n/2)
w=[w;zeros(1,m,l)];
end
[n,m,l]=size(w);
if m==2*floor(m/2)
w=[w,zeros(n,1,l)];
end