BASE (MATLAB)

Source: Internet
Author: User

Version

Memory

Clc

Clear

TAB key

F5 key to run m file

The F9 key only runs the selected

Ctrl+r notes

Ctrl+t Anti-annotation

Ctrl+i Formatting Code

Edit XXX.M to open xxx.m

A=1:0.5:9 Linear

Linspace (3,5)

%3 to 5 divided by default

Linspace (3,5,10)

%3 to 5 divided into 100

Xlsread (' Aaa.xls ') reads Excel but only reads the first label

A = [1 2 NaN]% non-numeric

A (1) =3% assignment

b= [1,2,3;4,5,6]

B (= 9) Second assignment to the first row

A (isNaN (a)) =[5]

A = [1 2 nan;4 NaN 6]% non-digital

A (isNaN (a)) = []

It's not a rectangle.

A=1

b=2

str = [Num2str (a), ' + ', Num2str (b)]

eval (str)

Execute a command with a string

a=[1,2,3]

A (end+1) = 5

Additional

Magic (8)

Generate 8*8 Data

A = [0,0,3;4,5,6;7,8,9;7,8,9]

b = [0,2,3;4,5,6;7,8,9;7,8,9]

All (A==B)

%all function Understanding: Whether this column has 0, if there are 0 returns 0, this function returns an array

% comparison, the same is 1, the difference is 0, so widely used in comparing the array is equal

%c=all (A==B)

%all (All (a==b))

a=[1,1,2,1,3,3,5;2,2,2,2,2,9,0]

Unique (a)

Go to re-ordered

a=[1,1,2,1,3,3,5;2,2,2,2,2,9,0]

%a (1,:) =[]

% Remove First line

%a (:, 2) =[]

% Remove 2nd Column

A (=999)

% modify the specified position value

Maximum Minimum

a=[1,1,2,1,3,3,5;2,2,2,2,2,9,0]

Min (min (a))

Max (Max (a))

DISP ('---') display

Min (a) min of each column

Max (a ') the maximum of each row

string = ' 0 '

IsNumeric (String)

a=[nan,1,2,1,3,3,5;2,2,2,2,2,9,0]

Mean (a)

Mean (a ')

Average

Drawing

A = [1:10]

B=a

A (end+1) = 5;

A (end+1) =15

Subplot (2,1,1)

Plot (a)

Title (' AAA ')

Subplot (2,1,2)

Plot (b)

Title (' BBB ')

A = [1:10]

b= [3:12]

A (end+1) = 5;

A (end+1) =15

B (end+1) = 15;

B (end+1) =5

Plot (a)

On

Plot (b)

Title (' BBB ')

Draw two lines on a chart

BASE (MATLAB)

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.