What does this mean?

output(i,j)=mean(temp(:));
What does this code mean? I don't know 'temp(:)' mean.

回答(1 个)

Stephen23
Stephen23 2020-3-3

0 个投票

The (:) syntax converts an array of any size and number of dimensions into a column vector.
So that code calculates the mean of all elements of temp (regardless of the size/dimensions of temp) and so will return exactly one value.

类别

帮助中心File Exchange 中查找有关 Logical 的更多信息

产品

版本

R2019a

提问:

2020-3-3

回答:

2020-3-3

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by