the usage of squeeze

3 次查看(过去 30 天)
tala
tala 2016-12-15
编辑: Guillaume 2016-12-15
hello i wanna know what does this command do. I_ij = double(squeeze(Image(i,j,:)))

回答(1 个)

the cyclist
the cyclist 2016-12-15
编辑:the cyclist 2016-12-15
It removes singleton dimensions from an array.
For example, it will take a 7 x 1 x 300 array and "squeeze" it into a 7 x 300 array.
The full documentation is here.
  1 个评论
Guillaume
Guillaume 2016-12-15
编辑:Guillaume 2016-12-15
In this particular case, assuming that Image is an rgb image, it converts a 1 x 1 x 3 vector, into a 3 x 1 vector of RGB intensity at pixel (i,j)

请先登录,再进行评论。

类别

Help CenterFile Exchange 中查找有关 Performance and Memory 的更多信息

标签

Community Treasure Hunt

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

Start Hunting!

Translated by