What are these commands in Matlab? Can any one explain them with examples. I searched them but didn't find any help

2 ビュー (過去 30 日間)
I don't understand the following commands in Matlab. I searched their help but in vain. Can anyone explain them with examples?
M = metadata.iqDAC.';
downsamp = metadata.fs_iqDAC/metadata.fs_iqADC;
squeeze
hanning
fftshift

回答 (1 件)

Rik
Rik 2021 年 7 月 23 日
The first line is accessing a field iqDAC of the struct metadata, which it transposes.
The second line divides two variables.
%you can also use doc instead of help
help squeeze
SQUEEZE Remove singleton dimensions. B = SQUEEZE(A) returns an array B with the same elements as A but with all the singleton dimensions removed. A singleton is a dimension such that size(A,dim)==1. 2-D arrays are unaffected by squeeze so that row vectors remain rows. For example, squeeze(rand(2,1,3)) is 2-by-3. See also SHIFTDIM. Documentation for squeeze doc squeeze Other functions named squeeze distributed/squeeze dlarray/squeeze tall/squeeze
help hanning
HANNING Hanning window. HANNING(N) returns the N-point symmetric Hanning window in a column vector. Note that the first and last zero-weighted window samples are not included. HANNING(N,'symmetric') returns the same result as HANNING(N). HANNING(N,'periodic') returns the N-point periodic Hanning window, and includes the first zero-weighted window sample. NOTE: Use the HANN function to get a Hanning window which has the first and last zero-weighted samples. See also BARTLETT, BLACKMAN, BOXCAR, CHEBWIN, HAMMING, HANN, KAISER and TRIANG.
help fftshift
FFTSHIFT Shift zero-frequency component to center of spectrum. For vectors, FFTSHIFT(X) swaps the left and right halves of X. For matrices, FFTSHIFT(X) swaps the first and third quadrants and the second and fourth quadrants. For N-D arrays, FFTSHIFT(X) swaps "half-spaces" of X along each dimension. FFTSHIFT(X,DIM) applies the FFTSHIFT operation along the dimension DIM. FFTSHIFT is useful for visualizing the Fourier transform with the zero-frequency component in the middle of the spectrum. Class support for input X: float: double, single See also IFFTSHIFT, FFT, FFT2, FFTN, CIRCSHIFT. Documentation for fftshift doc fftshift Other functions named fftshift codistributed/fftshift
  11 件のコメント
Walter Roberson
Walter Roberson 2021 年 7 月 24 日
Rik did the basic explaining; I described less than you could see in the first example of fft; https://www.mathworks.com/help/matlab/ref/fft.html#buuutyt-7
Sadiq Akbar
Sadiq Akbar 2021 年 7 月 24 日
Thanks for your help as well as for the help of Rik.

サインインしてコメントする。

カテゴリ

Help Center および File ExchangeGet Started with Signal Processing Toolbox についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by