n=3;
m=4;
for i=1:n
xline(i);
for j=1:m
yline(j);
end
end

3 件のコメント

Adam Danz
Adam Danz 2020 年 8 月 20 日
(i,j)
ravi shukla
ravi shukla 2020 年 8 月 20 日
how to plot it on graph... like how to show these imtersection points on graph
Adam Danz
Adam Danz 2020 年 8 月 20 日
Use the plot command. You may have to include hold on too.

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

 採用された回答

Star Strider
Star Strider 2020 年 8 月 20 日

0 投票

The intersections (in this example) are at all combinations of (i,j), in that order.

5 件のコメント

Star Strider
Star Strider 2020 年 8 月 20 日
A specific plot call is not necessary (at least in R2020a), since the xline and yline calls will plot those themselves, although adding:
axis([0 4 0 5])
will make the lines and intersections more easily visible, since the extremes would otherwise end up being coincident with the plot axes limits.
Adam Danz
Adam Danz 2020 年 8 月 20 日
To plot the intersection point, you will need to use plot() or scatter() etc.
Star Strider
Star Strider 2020 年 8 月 20 日
Perhaps, although not to plot the lines themselves.
ravi shukla
ravi shukla 2020 年 8 月 20 日
can we do it using mapshow? bcaz i did and i got the intersection points as picture
Star Strider
Star Strider 2020 年 8 月 20 日
I have no idea. I do not have the Mapping Toolbox, so I cannot respond to that.

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

その他の回答 (0 件)

カテゴリ

ヘルプ センター および File Exchange で Discrete Data Plots についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by