0

regarding my assignment work i have to plot 10*10 grid with cells labelled in numbers.now only i have started to learn mat lab.i have tried lot of methods, to plot the grid. but none gave solution to me.guys please help me

dinesh
  • 1

1 Answers1

2

this is more a Matlab question. for a 2D grid named G, you can plot it using imagesc fucntion.

Example:

colormap(gray);
imagesc(G, [-1 1]);

colormap here is used to plot the grid in grayscale color (-1 cells are displayed in black, 1 cells are displayed in white, and values between ]-1, 1[ are displayed in gray)

Amine Horseman
  • 162
  • 1
  • 12