Matlab Drawing Simple Notes

Source: Internet
Author: User

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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.