Here is the code in case anyone runs into this problem in the future:
[numRows, numCols] = size(NDVI); % matrix size
NDVII = zeros(numRows, numCols, 3); % zero filled array called NDVII with 3 layers
for j = 1:numCols % counter 'j' is going through each column
for i = 1:numRows % counter 'i' is going through each row
if NDVI(i, j) > 0
NDVII(i, j, :) = G(i, j); % ':' goes through all 3 layers
NDVII(i, j, 2) = 1; % makes it green
elseif NDVI(i, j) < 0
NDVII(i, j, :) = B(i, j);
NDVII(i, j, 3) = 1; % makes it blue
end
end
end