フィルターのクリア

circle in pcolor map with radius as half of map length

2 ビュー (過去 30 日間)
Bhowmik.U
Bhowmik.U 2019 年 4 月 5 日
コメント済み: Walter Roberson 2021 年 1 月 6 日
Hello, I want to plot pcolor
pcolor(X)
X=50 * 50 matrix
I wish to plot a circle within pcolor map; with centre as centre of circle; and radius as half of pcolor map.
I hope I am clear. Please help.
  5 件のコメント
Star Strider
Star Strider 2019 年 4 月 8 日
I am not certain what result you want.
If you define your pcolor plot in terms of a radius and an angle (rather than x and y), you can then use the pol2cart function to create a circle plot from it. For an example, see Applying shading radially outwards on a circle (link).
Bhowmik.U
Bhowmik.U 2019 年 4 月 9 日
I am enclosing the diagrammatic representation of my querry....I wish to eliminate the gray part from pcolor plot.

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

回答 (1 件)

Walter Roberson
Walter Roberson 2019 年 4 月 9 日
編集済み: Walter Roberson 2019 年 4 月 9 日
temp = -24.5:1:24.5;
mask = temp.^2 .' + temp.^2 > 24.5.^2;
Xt = X;
Xt(mask) = nan;
pcolor(Xt);
  1 件のコメント
Walter Roberson
Walter Roberson 2021 年 1 月 6 日
temp = -24.5:1:24.5;
mask = temp.^2 .' + temp.^2 <= 24.5.^2;
pcolor(X)
hold on
pcolor(mask)

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

カテゴリ

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

Community Treasure Hunt

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

Start Hunting!

Translated by