1.ps1 (' >> '); --No version displayed
2. Output:
A=pi;
Format Long
Format Short(4 -bit)
Disp (sprintf ('%0.2f ', a))
3. Input of the matrix:
A=[1 2;3 4;5 6]
A (+)--Take out the value of the second column in the first row
A (1,:)--Remove all values from the first row
A (:, 2)--Remove all values from the second column
A ([1 3],:)--Remove all elements from the first and third rows
A (:, 2) =[1:65:3231]--Change the elements of the second column
A=[A,[1;2;646]]--Add a column based on the original matrix
A (:)-- Place all elements of a in a column vector
V=[A,B] or v=[a B]-- connect a b matrix together (left or right)
V=[a; B]-- connect a B matrix together (up and down)
A=[1 2;
3 4;
5 6]
A=[1;2;6]--column vector
A=[1 2 6]--line vector
V=1:0.1:2--1 rows one column matrix
Ones (2,6)--Generates a 2*6 matrix of all 1
Zeros (3,7)--Generates a 3*7 matrix of all 0
Rand (3,9)--Generates a random matrix of 3*9 (each element is between 0-1 )
W=randn (3,9)--Generating a random Gaussian matrix of 3*9
hist (W)--Draw a histogram (in accordance with the Gaussian distribution)
Hist(w,50)-a histogramwith a number of blocks, followed by a parameter that determines how many bars
Eye (5)--Generates a 5*5 Unit matrix
Help Eye-View information about the eye
Size (a)--the command returns the number of rows and columns of a matrix
Size (a,1)--the command returns the number of rows of a matrix
Size (a,2)--the command returns the number of columns of a matrix
Length (a)--Returns The largest dimension of a matrix
PWD--View octave installation path
CD ' C:\User\Administrator\Desktop '--Move the installation path to the desktop
Who--displays All variables currently stored by Octave
Whos--Displays All variables currently stored by octave (more detailed)
Clear features--Clear variables
V=price (1:10)--Create a 10*1 column vector ( price for the file of the stored prices)
Save Hello.mat v--Save the variable v to the hello.mat file
Save Hello.txt V-ascii--Save the variable v to the hello.txt file
Operation of Machine Learning--octave (1)--day2