need script to create a block scenario

1 回表示 (過去 30 日間)
Jaspreet Kaur
Jaspreet Kaur 2022 年 12 月 29 日
編集済み: Les Beckham 2022 年 12 月 29 日
I am looking fora script to create a scenario shown in attachement. can anyone tell me how to draw the block of 3x3m which is divided in 1 m sub blocks? How can i introduce transmitter and recivers at desired places in the same scenario.

回答 (1 件)

Les Beckham
Les Beckham 2022 年 12 月 29 日
編集済み: Les Beckham 2022 年 12 月 29 日
If you only want to draw a 3x3 grid of 1x1 squares this is pretty easy (see below). If you want the 0.75x0.75 and 0.5x0.5 squares also but not interlocked as your image shows just wrap this code in another loop. If you want them interlocked (sometimes the green is on top of the blue and sometimes vice versa, for example), it is going to be much harder. I'm not even going to try right now.
for x = 0:2
for y = 0:2
rectangle('Position', [x y 1 1], 'EdgeColor', 'g', 'LineWidth', 2)
end
end
axis equal
axis 'off'
I don't know what you mean about placing "transmitter and recievers at desired places". Also, it is unclear what you mean by "scenario".

カテゴリ

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