フィルターのクリア

Plotting 3D grating

4 ビュー (過去 30 日間)
Arash A.
Arash A. 2020 年 8 月 11 日
コメント済み: Arash Ahmadivand 2020 年 8 月 13 日
Considering the plots below, I have a problem in adding an extra dimension to a 1D rectangular pulse train. In other words, I am trying to implement a 3D grating in matlab, as shown below. Any help would be appreciated!

採用された回答

hosein Javan
hosein Javan 2020 年 8 月 11 日
I think this is what you're looking for
x = [1 2 2 3 3 4 4 5 5 6];
z = [0 0 1 1 0 0 1 1 0 0];
y = [1 4];
[X,Y] = meshgrid(x,y)
Z = repmat(z,[length(y) 1])
surf(X,Y,Z,'FaceColor',[0.5 0.5 0.5])
  6 件のコメント
hosein Javan
hosein Javan 2020 年 8 月 12 日
پاینده باشید. اگر امر دیگری بود در خدمتتونم
Arash Ahmadivand
Arash Ahmadivand 2020 年 8 月 13 日
Sure, thanks so much for your help.

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

その他の回答 (0 件)

カテゴリ

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

Community Treasure Hunt

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

Start Hunting!

Translated by