ホワイトノイズ、ピン​クノイズの作成方法と​、作成したノイズを電​流に乗せる方法を教え​てください

4 views (last 30 days)
大地
大地 on 22 Jan 2025
Commented: 大地 on 6 Feb 2025
ホワイトノイズ、ピンクノイズの作成方法と、作成したノイズをトンネル電流zに乗せる方法を教えてください。
トンネル電流zは以下のプログラムから出力します。
pixel_image = 256; %ラスタ走査によって得られる画像のピクセル数を入力(2^nを入力)
dr = 1/(2*sqrt(3)); %ディザ円半径を入力[格子]
a_fast_grid = 10; %fast軸走査範囲[格子]
a_slow_grid = 10; %slow軸走査範囲[格子]
fm=5000; %ディザ円変調周波数[Hz]
fs= fm*240 ; %サンプリング周波数[Hz]
f_fast = 10.2; %走査周波数[Hz]を入力(1[s]の1line走査回数)
start_point_x = 0; %走査開始点のx座標を入力(1[格子]分動かしたい時は1を入力)
start_point_y = 0; %走査開始点のy座標を入力(1[格子]分動かしたい時は1を入力)
%fast軸三角波のパラメータ設定
amplitude_fast = a_fast_grid/2; %fast軸振幅
%slow軸三角波のパラメータ設定
amplitude_slow = a_slow_grid/2; %slow軸振幅
f_slow = (f_fast)/(2*pixel_image); %slow軸三角波周波数
% 時間ベクトルの生成
total_time=256/f_fast; %全走査時間
t = linspace(0, total_time, fs * total_time);
x_raster = start_point_x + amplitude_fast*(2/pi)*acos(cos(2*pi*f_fast*t));
y_raster = start_point_y + amplitude_slow*(2/pi)*acos(cos(2*pi*f_slow*t));
x_dither = dr*cos(2*pi*fm*t);
y_dither = dr*sin(2*pi*fm*t);
x = x_raster + x_dither;
y = y_raster + y_dither;
z1 = cos(2*pi*((x-y)/(sqrt(3))));
z2 = cos(2*pi*(2*y/(sqrt(3))));
z3 = cos(2*pi*((x+y)/(sqrt(3))));
z = (z1 + z2 + z3);

Answers (1)

Hiro Yoshino
Hiro Yoshino on 3 Feb 2025
pinknoise, randn を使えばそれぞれピンクノイズ、ホワイトノイズを作成できます
  2 Comments
takemoto
takemoto on 4 Feb 2025
補足ですが、こちら↓では、白色、ピンク以外に、brown, blue, purple等も生成できます
大地
大地 on 6 Feb 2025
ご回答ありがとうございます。
参考にして作ることができました。
ありがとうございました。

Sign in to comment.

Products


Release

R2024b

Community Treasure Hunt

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

Start Hunting!