I am trying to create a large box (Four division) and further divide individual box into four small boxes. I am able to divide the boxes on bottom left and top right portion but not in top left and bottom right portion, can anyone please help me on this. I have attached the MATLAB code and also the image for reference.
Thank you
The code:
clearclcnx=3;ny=3;x=linspace(0,1,nx);y=linspace(0,1,ny);[X,Y]=meshgrid(x,y);%%%%%%%%%%%%%%%%%%%
x1=linspace(0,1/2,nx);y1=linspace(0,1/2,ny);[X1,Y1]=meshgrid(x1,y1);%%%%%%%%%%%%%%%%%%%x2=linspace(0,1/4,nx);y2=linspace(0,1/4,ny);[X2,Y2]=meshgrid(x2,y2);%%%%%%%%%%%%%%%%%%%x3=linspace(1/2,1,nx);y3=linspace(1/2,1,ny);[X3,Y3]=meshgrid(x3,y3);plot(X,Y,'k',Y,X,'k');hold onplot(X1,Y1,'k',Y1,X1,'k');hold onplot(X2,Y2,'k',Y2,X2,'k');hold onplot(X3,Y3,'k',Y3,X3,'k');
Best Answer