Final answer:
The command to find the standard deviation for each column in a 10-by-20 matrix Z is std(Z), which will return a row vector of the standard deviations.
Step-by-step explanation:
The command to give the standard deviation for each column in a 10-by-20 matrix Z is std(Z). The syntax std(Z) computes the standard deviation for each column in the matrix Z, giving a row vector where each element represents the standard deviation of the corresponding column in Z. The other options provided do not achieve this task, as:
- std(Z(:)) would compute the standard deviation of all elements in Z if treated as a single vector.
- std(std(Z)) would compute the standard deviation of a vector containing the standard deviations of each column, which is not the task at hand.
- std(Z(1:5, :)) would compute the standard deviation for each column, but only for the first five rows of Z, not the entire matrix.
To find the standard deviation for each column in a 10-by-20 matrix Z, you should use the command d. std(Z). This command will calculate the standard deviation for each column individually.