Write an M-function with the following specifications:
function H = imcircle(R, M, N)
%IMCIRCLE Generates a circle inside a rectangle.
% H = IMCIRCLE(R, M, N) generates a circle of radius R centered
% on a rectangle of height M and width N. H is a binary image with
% 1s on the circle and 0s elsewhere. R must be an integer >= 1.
Your program must check the validity of R and also it should check to make sure that the specified circle fits in the given rectangle dimensions. Use of for or while loops is not permitted. Hint: Review function meshgrid and become familiar with function floor.
function H = imcircle(R,M,N)
%IMCIRCLE Generates acircle inside a rectangle.
% H = IMCIRCLE(R,M,N) generates a circle of radius R centered on a
% rectangle of height M and width N. H is a banary image with 1s on the
% circle and 0s elsewhere.R must be an integer >=1.
if (R>(min(M,N)/2