print values of array greater than 0

17 次查看(过去 30 天)
Hello,
I am trying to sort/split an arrray into another array. For my application, I need to replace the array's 0s with either an empty space ' ' or simply continues to print the array out in table format and leave the 0s blank. I've been banging my head on the table for an hour now trying to find a function/print/slice/sort combination that will do this. Any help is greatly appreciated.
Thank You,

采纳的回答

madhan ravi
madhan ravi 2020-7-26
Just use > to find values greater than 0.
doc >
Hope you’re not bleeding :(
  4 个评论
madhan ravi
madhan ravi 2020-7-26
ix = array15(r, :) > 0;
array15(ix, :)
Robert Hansen
Robert Hansen 2020-7-26
Ahh I have got it working now. Thanks for the help

请先登录,再进行评论。

更多回答(0 个)

类别

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

产品


版本

R2020a

Community Treasure Hunt

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

Start Hunting!

Translated by