How to make a simple grid of coordiantes ?

8 ビュー (過去 30 日間)
Ben Worrall
Ben Worrall 2021 年 4 月 16 日
コメント済み: Ben Worrall 2021 年 4 月 16 日
I'm very new to matlab, I just want to plot a grid of points so that there is a point at (0,0) (0,1) (1,0) (1,1) so on for an 11 x 11 grid. I just want the coordinates marked not lines connecting them. How would I do this quickly. All I know is 'plot (x,y)' and then use 'hold on' and do the next point but this would take forever. Please help :)

採用された回答

Rik
Rik 2021 年 4 月 16 日
If you read the documentation, you can see how to plot vectors without plotting connecting lines.
As for generating the coordinate grid you have two option: meshgrid and ndgrid.
[X,Y]=ndgrid(linspace(0,1,11));%generate grid
X=X(:);Y=Y(:);%linearize to vectors
  1 件のコメント
Ben Worrall
Ben Worrall 2021 年 4 月 16 日
thanks a lot :)

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

その他の回答 (0 件)

カテゴリ

Help Center および File Exchange2-D and 3-D Plots についてさらに検索

製品

Community Treasure Hunt

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

Start Hunting!

Translated by