2. In MATLAB, you can create a two-dimensional array in the form of spaces and semicolons. The elements in each line are separated by spaces and semicolons when the line breaks. It should be noted that the number of elements in each row needs to be the same, and it is easy to report errors when they are different.
3. In MATLAB, you can also create a comma+semicolon array. The elements in each line are separated by commas and semicolons when the line breaks. The number of elements in each row needs to be the same. If the number of elements in each row is different, MATLAB will report an error.
4. In MATLAB, you can use colons to create arrays. A=a:b means to create an array A, from real number A to real number B, with an interval of 1 ... The array A created in the above way is a one-dimensional array, which can also be called a row vector. By default, the difference between two adjacent elements of array A is 1.
You can also create an increasing or decreasing array with fixed intervals in a more free way. A=a:b:c means increasing or decreasing from real number A to real number B at intervals of C, and creating array A ... When creating an array in this way, the first element and the last element of array A are A and B respectively, and the difference between two adjacent elements of the array is C.