MATLAB built-in Tutorial Study Notes 1

Source: Internet
Author: User

Variable assignment, similar

A = 1

B = 2

 

Array assignment, similar:

T = [1 2 3 4 5]

T = 1:5

T =.

 

Use the Whos command to output the currently defined variables:

Help Original:

Whos is a long form of WHO. It lists all the variables in the current
Workspace, together with information about their size, bytes, class,
Etc.

 

Draw a curve:

Plot function:

Plot (x, y), with X as the horizontal axis, y as the vertical axis, and XY as the ing relationship;

For example, draw the following Curve

Y = sin (2 * pI * t)

 

Operation:

Use: T = 0: 0. 01:1;

Defines the accuracy of T independent variables;

Use: Y = sin (2 * pI * t );

Define the function body;

Use: plot (T, Y)

Draw images;

The result is

 

Note that different precision causes different smoothness of the drawn curve;

At this time, the image can be output into many formats, such as BMP bitmap and jpg image files;

 

MATLAB built-in Tutorial Study Notes 1

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.