フィルターのクリア

How to create a solid structure

8 ビュー (過去 30 日間)
Francesco
Francesco 2014 年 3 月 29 日
コメント済み: Star Strider 2014 年 3 月 30 日
Hi everybody, I have some problems with the writing of a Matlab script able to create the following solid structure:
This structure should be a single sector of a football stadium, on the tilted surface I will distribute a regular disposition of seats. Thanks to all for the help! Have a god day!
  2 件のコメント
Azzi Abdelmalek
Azzi Abdelmalek 2014 年 3 月 29 日
Are you using a specific toolbox?
Francesco
Francesco 2014 年 3 月 29 日
No!

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

採用された回答

Star Strider
Star Strider 2014 年 3 月 29 日
編集済み: Star Strider 2014 年 3 月 29 日
Does this do what you want?
x = linspace(1,50,50);
y = linspace(1,100);
[X Y] = meshgrid(x,y);
Z = X.*tand(30);
figure(1)
mesh(X, Y, Z)
EDIT:
To see what the stadium would look like as steps rather than as a continuous surface, plot figure(2):
figure(2)
bar3(Z)
axis equal
  4 件のコメント
Francesco
Francesco 2014 年 3 月 30 日
Ok, I guess to have a figure that could explain the scenario that I would model: the first figure represents the stadium
is it possible reconstruct this plot? The 2nd figure is the red area that is the single stadium sector, the tilted surface, with more precise division among the seats:
For this second image I would generate the two vectors x and y with linspace command and the z coordinates withe X.*tand(30). The x vector will have a separation of 1 (1m) while the y vector will have a separation of 0.5 (0.5m). Does it right?
Star Strider
Star Strider 2014 年 3 月 30 日
In that situation, your y vector (that eventually creates the Y matrix) would be:
y = linspace(0,100,200);
I used (0,100,200) here. You may have to experiment with variations such as (1,100,200) until you get the result you want, since I don’t know how you want to specify or calculate them. Having 200 elements in 100 meters puts them about a half meter apart.

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

その他の回答 (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