print values of array greater than 0

17 views (last 30 days)
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,

Accepted Answer

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

Sign in to comment.

More Answers (0)

Products


Release

R2020a

Community Treasure Hunt

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

Start Hunting!