Func thar operates like repmat

1 次查看(过去 30 天)
Hi i need to write in one code line function who does the same as repmat function Anyone's idea please :)

采纳的回答

Walter Roberson
Walter Roberson 2017-7-30
Hint:
Instead of writing
MyRGBImage = repmat(MyGrayScaleImage, 1, 1, 3)
I write
MyRGBImage = repmat(MyGrayScaleImage(:,:, ones(1,3))
  2 个评论
yuval ohayon
yuval ohayon 2017-7-31
Not what i ment,i need to change matrix without the repmat func
Walter Roberson
Walter Roberson 2017-7-31
Sorry, I meant to write,
MyRGBImage = MyGrayScaleImage(:,:, ones(1,3))

请先登录,再进行评论。

更多回答(1 个)

yuval ohayon
yuval ohayon 2017-7-31
Not what i ment.. Without using repmat function..

类别

Help CenterFile Exchange 中查找有关 Logical 的更多信息

标签

Community Treasure Hunt

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

Start Hunting!

Translated by