function [r,R,S] = imnoise3(M, N, C, A, B) K =size(C, 1); if nargin < 4 A = ones(1,K); end if nargin < 5 B = zeros(K, 2); end R = zeros(M, N);