Current location - Plastic Surgery and Aesthetics Network - Plastic surgery and beauty - How to create multidimensional array with matlab
How to create multidimensional array with matlab
1. Open matlab and enter zero (2,3) in the command line window, as shown in the figure below.

2. After pressing Enter, you can see that a two-dimensional array with 2 rows and 3 columns has been created.

3. Enter1(3,4) in the command line window, as shown in the following figure.

4. After pressing Enter, you can see that an array with 3 rows and 4 columns has been created, as shown in the figure below.

5.zeros function creates an array of all 0s with a certain size, and ones function creates an array of all 1 with a certain size, which can be predefined. All 0s and all 1 are equivalent to an empty array. After definition, you can assign a value to the array and select it as needed.