www.gusucode.com > matlab 案例源码 matlab代码程序 > matlab/RemainderofaVectorExample.m

    %% Remainder After Division of Vector  

%%
% Find the remainder after division for a vector of integers and the
% divisor |3|.
a = 1:5;
b = 3;
r = rem(a,b)