Difficulty understanding the notation/arguments in the following plot function in MATLAB

33 Views Asked by At

I am currently reading through examples on how to display wav files in Matlab and I came across this example, but I am not sure what the arguments reprent inside the plot function:

Create this figure in Matlab:

$x = $wavread(‘horn.wav’);

plot$(x(:, 1));$

plot$(x(4000:10000, 1));$

What does $x(4000:10000, 1)$ do inside the plot?

1

There are 1 best solutions below

0
On BEST ANSWER

$x=$wavread(‘horn.wav’) stores the data in the ‘horn’ file as a matrix ‘$x$’.

$x(:,1)$ denotes the entire first column of $x$

$x(4000:10000,1)$ denotes the entries(rows) $4000$ to $10000$ in column $1$.