特定の位置の、データを抜き出す方法を教えてください。
显示 更早的评论
走査型トンネル顕微鏡の探針を動かして、トンネル電流zを取得します。探針はラスター走査(三角波のような挙動)+ディザ円運動の挙動をとって走査します。このトンネル電流zを、時間間隔Δtm=N(1/fm+j/fm)(N=0, 1, 2, ….., j=0, 1, 2, 3, 4, 5)で取り出し、描画したいです。j=0, 1, 2, 3, 4, 5はディザ円周の6等分の位置を示します。この6点は、A,B,C,D,E,F点であり、それぞれディザ円の、210,330,90,30,150,270°となっています。各点でのトンネル電流をそれぞれ抜き出す方法を教えてください。
以下に、ラスター走査とディザ円運動のイメージを添付します。

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);
% ラスター走査のプロット
figure;
plot(x_raster, y_raster, 'b.-');
title('ラスター走査軌跡');
xlabel('x 座標');
ylabel('y 座標');
axis equal;
grid on;
% ディザ円のプロット
figure;
plot(x_dither, y_dither, 'b.-');
title('ディザ円走査軌跡');
xlabel('x 座標');
ylabel('y 座標');
axis equal;
grid on;
%ディザ+ラスターのプロット
figure;
plot(x, y, 'b.-');
title('ラスター走査+ディザ円軌跡');
xlabel('x 座標');
ylabel('y 座標');
axis equal;
grid on;
%参照信号作成
w = 2*pi*fm ;
phi = 0 ;
reference_signal = sin(w*t+phi) ;
%ミキシング信号作成
mixising_signal = z.* reference_signal ;
%ローパスフィルターの適用
f_cutoff = 500 ; %カットオフ周波数[Hz]の設定
lowpass_signal = lowpass(mixising_signal,f_cutoff,fs,ImpulseResponse="iir",Steepness=0.95) ;
回答(1 个)
2*pi では無く、角度を指定すれば良いのでは?
dr = 1/(2*sqrt(3));
fm=50;
fs= fm*2; %サンプリング周波数[Hz]
f_fast = 10.2; %走査周波数[Hz]を入力(1[s]の1line走査回数)
total_time=256/f_fast; %全走査時間
t = linspace(0, total_time, fs * total_time);
% ------------------------
thetas = deg2rad([210,330,90,30,150,270]) % degree to radian
x_dither = dr.*cos(thetas'*fm.*t)
y_dither = dr*sin(thetas'*fm.*t)
类别
在 帮助中心 和 File Exchange 中查找有关 Biomedical Imaging 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!

