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

3 views (last 30 days)
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;

Answers (1)

Rik on 23 Jul 2021
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

Sign in to comment.


Find more on Matrices and Arrays in Help Center and File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by