Skip to content

Commit

Permalink
rename pad.m canlab_pad.m
Browse files Browse the repository at this point in the history
  • Loading branch information
torwager committed Jan 5, 2025
1 parent 5bfb14d commit 133ea57
Showing 1 changed file with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
@@ -1,24 +1,24 @@
function [x,L] = pad(x,L)
function [x,L] = canlab_pad(x,L)
% :Usage:
% ::
%
% x = pad(x,L)
%
%
% pads x with zeros of length L
%
% or, if L is a vector, to longest of two (NOT DONE)
%
% COLUMN VECTORS

if length(L) == 1

x = [x; zeros(L,size(x,2))];

else
len = max(size(x,1),size(L,1));
x = [x; zeros(len - size(x,1),size(x,2))];
L = [L; zeros(len - size(L,1),size(L,2))];

end

return
end

0 comments on commit 133ea57

Please sign in to comment.