How can I define a variable which has integer values?

I just started using mat-lab, and I searched the help, and I only found assumptions command, which doesn't work! it gives me the error : Undefined function 'assumptions' for input arguments of type
Actually, I want to draw a grid: I want to write a code which each time draw a grid of specified size (all the points should have integer coordinates)!

1 个评论

Not sure at all about what you mean by "draw a grid of specified size".
If you mean an axis w/ integer tick labels, simply use the range of 0:N and L:M, say as the values for x and y ticks.

请先登录,再进行评论。

回答(0 个)

类别

提问:

2013-6-9

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by