explain wave=zeros(1000,381); in matlab

This line of code is creating an array in Matlab called "wave" that is a 1000 x 381 matrix filled with zeros. Here, 1000 represents the number of rows and 381 represents the number of columns in the matrix.

This array can be used to store numerical values, for example, if we have some data to store that is 1000 rows by 381 columns, we could assign the data to this array by using:

main.m
wave = [1 2 3; 4 5 6; 7 8 9]; % example data
45 chars
2 lines

Now, the first three rows and columns of "wave" would look like:

main.m
0 0 0
0 0 0
0 0 0
1 2 3
4 5 6
7 8 9
0 0 0
0 0 0
0 0 0
54 chars
10 lines

Overall, this line of code creates an empty matrix of zeros that can be used to store and manipulate data in Matlab.

related categories

gistlibby LogSnag