フィルターのクリア

Find coordinates of grids

1 回表示 (過去 30 日間)
Asim Ismail
Asim Ismail 2017 年 5 月 13 日
編集済み: Asim Ismail 2017 年 5 月 13 日
If we divide a 100x100 plot into six grids, then how can we get the four coordinates of each grid?
Any idea...

採用された回答

Image Analyst
Image Analyst 2017 年 5 月 13 日
Use linspace() to find the edges of the zones:
zoneBoundaries = linspace(0, 100, 7)
That divides a region going from 0 to 100 into 6 zones (7 edges). If you have an array, like an image, then you'll need to start at 1 instead of 0 and round the values into integers because otherwise you'll get fractional values out.
  3 件のコメント
Image Analyst
Image Analyst 2017 年 5 月 13 日
Use 4 instead of 7:
zoneBoundaries = linspace(0, 100, 4)
The numbers you get can be used for each - x and y. If you want two variables, use two variables:
xCoordinates = linspace(0, 100, 4)
yCoordinates = linspace(0, 100, 4)
Asim Ismail
Asim Ismail 2017 年 5 月 13 日
編集済み: Asim Ismail 2017 年 5 月 13 日
Its done thank you @Image Analyst

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeAnnotations についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by