How do I find the value closest to my desired value in a vector
1 次查看(过去 30 天)
显示 更早的评论
L=10;
n=1.45;
c=2.9979e8;
dt=6e-12; %time increment
Omega=1.020663297455751e+11;
GAMMAb=3.590391604102621e+08;
T=10*2*L*n/c; %total time
fmax = 1e9; %maximun frequency
%fs=80*fmax;
TA=-T/2:dt:T/2; %time axis for the signal
fs=1/dt; %sampling frequency
%t = (-T/2/dt:1:T/2/dt)*dt;
Nt=round(T/dt);
FA = (-Nt/2:Nt/2-1)/Nt*fs %frequency axis
How do I find a value closest to ftreqlims in frequency axis.
freqlims=Omega/2/pi-GAMMAb/2/pi
0 个评论
回答(1 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Fourier Analysis and Filtering 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!