フィルターのクリア

uniformly distributed random vectors

2 ビュー (過去 30 日間)
Alexai
Alexai 2022 年 4 月 17 日
回答済み: Torsten 2022 年 4 月 17 日
The matlab function 'mean' rearranges the set of data so that the mean of the x and y axes is zero, and the adjusted points are named Rctr.Rctr points that are more than 0.5 radius from the origin are removed, and the resulting set of points is named Rcirc, i.e. the points in Rcirc are in a circle of 0.5.
I want to make p2, p3 images So I maked this code for p1 clc;clear N=1000; A=rand(2,N); x=A(1,:); y=A(2,:); subplot(1,1,1); plot(x,y,'+'); hold on set(gca,'YTick',[0:0.1:1]);

採用された回答

Torsten
Torsten 2022 年 4 月 17 日
N=1000;
A=rand(2,N);
x=A(1,:);
y=A(2,:);
x = x-mean(x);
y = y-mean(y);
idx = x.^2+y.^2<=0.25;
x=x(idx);
y=y(idx);
plot(x,y,'+')

その他の回答 (0 件)

カテゴリ

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

Community Treasure Hunt

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

Start Hunting!

Translated by