特定の位置の、データ​を抜き出す方法を教え​てください。

3 views (last 30 days)
大地
大地 on 20 Jan 2025
Moved: Kojiro Saito on 7 Feb 2025
走査型トンネル顕微鏡の探針を動かして、トンネル電流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) ;

Answers (1)

Hiro Yoshino
Hiro Yoshino on 3 Feb 2025
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
thetas = 1×6
3.6652 5.7596 1.5708 0.5236 2.6180 4.7124
<mw-icon class=""></mw-icon>
<mw-icon class=""></mw-icon>
x_dither = dr.*cos(thetas'*fm.*t)
x_dither = 6×2509
0.2887 -0.0751 -0.2496 0.2049 0.1430 -0.2793 0.0023 0.2781 -0.1470 -0.2017 0.2519 0.0707 -0.2886 0.0795 0.2473 -0.2081 -0.1390 0.2804 -0.0068 -0.2769 0.1509 0.1984 -0.2541 -0.0662 0.2885 -0.0839 -0.2449 0.2113 0.1350 -0.2815 0.2887 -0.2790 0.2506 -0.2054 0.1464 -0.0776 0.0036 0.0707 -0.1402 0.2003 -0.2470 0.2771 -0.2886 0.2807 -0.2541 0.2104 -0.1525 0.0845 -0.0108 -0.0637 0.1339 -0.1951 0.2432 -0.2750 0.2883 -0.2823 0.2574 -0.2152 0.1586 -0.0913 0.2887 0.2040 -0.0003 -0.2045 -0.2887 -0.2035 0.0010 0.2049 0.2887 0.2031 -0.0016 -0.2054 -0.2887 -0.2026 0.0023 0.2058 0.2887 0.2022 -0.0029 -0.2063 -0.2887 -0.2017 0.0036 0.2068 0.2886 0.2012 -0.0042 -0.2072 -0.2886 -0.2008 0.2887 0.2788 0.2499 0.2040 0.1441 0.0745 -0.0003 -0.0751 -0.1447 -0.2045 -0.2503 -0.2790 -0.2887 -0.2787 -0.2496 -0.2035 -0.1436 -0.0738 0.0010 0.0757 0.1453 0.2049 0.2506 0.2792 0.2887 0.2785 0.2493 0.2031 0.1430 0.0732 0.2887 0.0745 -0.2503 -0.2035 0.1453 0.2785 -0.0016 -0.2793 -0.1425 0.2058 0.2486 -0.0776 -0.2887 -0.0713 0.2519 0.2012 -0.1481 -0.2776 0.0049 0.2801 0.1396 -0.2081 -0.2470 0.0807 0.2886 0.0681 -0.2535 -0.1989 0.1509 0.2767 0.2887 -0.2045 0.0010 0.2031 -0.2887 0.2058 -0.0029 -0.2017 0.2886 -0.2072 0.0049 0.2003 -0.2886 0.2086 -0.0068 -0.1989 0.2886 -0.2099 0.0088 0.1974 -0.2885 0.2113 -0.0108 -0.1960 0.2884 -0.2126 0.0127 0.1946 -0.2884 0.2139
<mw-icon class=""></mw-icon>
<mw-icon class=""></mw-icon>
y_dither = dr*sin(thetas'*fm.*t)
y_dither = 6×2509
0 0.2787 -0.1450 -0.2033 0.2508 0.0729 -0.2887 0.0773 0.2485 -0.2065 -0.1410 0.2799 -0.0046 -0.2775 0.1489 0.2000 -0.2530 -0.0684 0.2886 -0.0817 -0.2461 0.2097 0.1370 -0.2810 0.0091 0.2762 -0.1528 -0.1967 0.2552 0.0640 0 0.0741 -0.1433 0.2029 -0.2488 0.2781 -0.2887 0.2799 -0.2524 0.2079 -0.1495 0.0810 -0.0072 -0.0672 0.1370 -0.1977 0.2451 -0.2760 0.2885 -0.2816 0.2558 -0.2128 0.1556 -0.0879 0.0143 0.0602 -0.1307 0.1924 -0.2412 0.2739 0 0.2042 0.2887 0.2038 -0.0007 -0.2047 -0.2887 -0.2033 0.0013 0.2052 0.2887 0.2029 -0.0020 -0.2056 -0.2887 -0.2024 0.0026 0.2061 0.2887 0.2019 -0.0033 -0.2065 -0.2887 -0.2015 0.0039 0.2070 0.2886 0.2010 -0.0046 -0.2074 0 0.0748 0.1444 0.2042 0.2501 0.2789 0.2887 0.2787 0.2498 0.2038 0.1439 0.0741 -0.0007 -0.0754 -0.1450 -0.2047 -0.2504 -0.2791 -0.2887 -0.2786 -0.2495 -0.2033 -0.1433 -0.0735 0.0013 0.0760 0.1456 0.2052 0.2508 0.2792 0 0.2789 0.1439 -0.2047 -0.2495 0.0760 0.2887 0.0729 -0.2511 -0.2024 0.1467 0.2781 -0.0033 -0.2797 -0.1410 0.2070 0.2478 -0.0792 -0.2886 -0.0697 0.2527 0.2000 -0.1495 -0.2772 0.0065 0.2805 0.1382 -0.2092 -0.2461 0.0823 0 0.2038 -0.2887 0.2052 -0.0020 -0.2024 0.2887 -0.2065 0.0039 0.2010 -0.2886 0.2079 -0.0059 -0.1996 0.2886 -0.2092 0.0078 0.1982 -0.2885 0.2106 -0.0098 -0.1967 0.2885 -0.2119 0.0117 0.1953 -0.2884 0.2132 -0.0137 -0.1938
<mw-icon class=""></mw-icon>
<mw-icon class=""></mw-icon>
  1 Comment
大地
大地 on 6 Feb 2025
Moved: Kojiro Saito on 7 Feb 2025
ご回答ありがとうございます。
参考にさせていただきます。
ありがとうございました。

Sign in to comment.

Categories

Find more on イメージ in Help Center and File Exchange

Products


Release

R2024b

Community Treasure Hunt

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

Start Hunting!