function [GFP_out, OD_out, GFP_err, OD_err]=colicin_one_plate(GFP_in, OD_in, x_mid, y_mid, x_med_start, x_med_end, y_med_start, y_med_end)
    med_OD=nanmean(OD_in(y_med_start:y_med_end, x_med_start:x_med_end))
    
    x = 12/x_mid;
    y = 8/y_mid;
    
    for i=1:1:y
        for j=1:1:x
            if (x*x_mid >= x_med_start && y*y_mid>= y_med_start && x*x_mid <= x_med_end && y*y_mid<=y_med_end)
                if(x_med_start==x_med_end)
                    if(x_med_start/x_mid==x)
                        OD_out(i, j) = OD_in((i-1)*y_mid+1, (j-1)*x_mid+1);
                        GFP_out(i, j) = GFP_in((i-1)*y_mid+1,(j-1)*x_mid+1);
                        GFP_err(i, j) = 0;
                        OD_err(i, j) = 0;
                    else
                        OD_out(i, j) = OD_in((i-1)*y_mid+1:i*y_mid, j*x_mid);
                        GFP_out(i, j) = GFP_in((i-1)*y_mid+1:i*y_mid,j*x_mid);
                        GFP_err(i, j) = 0;
                        OD_err(i, j) = 0;
                    end
                elseif(y_med_start==y_med_end)
                    if(y_med_start/y_mid==y)
                        OD_out(i, j) = OD_in((i-1)*y_mid+1, (j-1)*x_mid+1);
                        GFP_out(i, j) = GFP_in((i-1)*y_mid+1,(j-1)*x_mid+1);
                        GFP_err(i, j) = 0;
                        OD_err(i, j) = 0;
                    else
                        OD_out(i, j) = nanmean(OD_in(i*y_mid, j*x_mid));
                        GFP_out(i, j) = nanmean(GFP_in(i*y_mid,j*x_mid));
                        GFP_err(i, j) = 0;
                        OD_err(i, j) = 0;
                    end
                end
            else
                OD_out(i, j) = nanmean(OD_in((i-1)*y_mid+1:i*y_mid, (j-1)*x_mid+1:j*x_mid));
                GFP_out(i, j) = nanmean(GFP_in((i-1)*y_mid+1:i*y_mid,(j-1)*x_mid+1:j*x_mid));
                GFP_err(i, j) = nanstd(GFP_in((i-1)*y_mid+1:i*y_mid,(j-1)*x_mid+1:j*x_mid));
                OD_err(i, j) = nanstd(OD_in((i-1)*y_mid+1:i*y_mid, (j-1)*x_mid+1:j*x_mid));
            end
        end
    end
end