The general drawing is divided into two kinds: the time domain and the frequency domain signal expression basically are consistent, grasps several commonly used signal expression to be able. Exponent, cosine, step, pulse, sinc, complex exponent, random signal.
The first thing to understand before drawing is that the x-axis is the drawing basis, is a set of data series, if the time domain graph, then the x-axis is the temporal sequence, if the frequency domain graph, then the x-axis is a set of frequency sequence. This set of sequences must have maximum and minimum values. Need to be aware.
(1) Time domain
When plotting in the time domain, it is mainly the x-axis drawing. In the time domain graph, the x-axis is usually time-coordinate. So when drawing, you need to pay attention to sampling interval time and sampling frequency. According to the description in the sampling theorem, the sampling frequency is generally greater than twice times the signal frequency.
MATLAB Program beginning General:
dt = 0.01; t = 0:dt:4 * PI;
Or
N = 256; DT = 0.05; n = 0:n-1; t = n * DT;
Or
FS = 1000; N = 1024; n = 0:n-1; t = n/fs;
Plot (t, X) is called at the end of the drawing.
(2) Frequency domain
In the frequency domain, the graph is generally amplitude-frequency, phase-frequency, and FT's real and imaginary parts are expressed as the FT, DFT, FFT and other transformation processes, only need to remember the formula they used and then take in the calculation (including integral sum, etc.).
In all transformations, it is necessary to start by indicating the size of the data length n.
The beginning of the MATLAB program is generally as follows:
N = 256; DT = 0.05; n = 0:n-1; t = n * DT; K = 0:length (magxk)-1;
Plots are described in plot (k/(N * dt), MAGXK * 2/n); % k/(N * dt) represents a frequency sequence, *2/n is expressed as a true amplitude value or F = N * fs/n; Plot (f (1:N/2), MAGXK (1:N/2) * 2/n);
Another point of drawing tips:
| | |
| | Such a drawing uses subplot (2,2,1); Subplot (2,2,2); Subplot (2,1,2);
Matlab Drawing Simple Notes