Manipulation to be done in arrays.

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Yash J

    #1

    Manipulation to be done in arrays.

    i want to create a 10x10 matrix(with user input)

    for e.g., i have given a small sample of 2x2 matrix and below is the description regarding what manipulation i want to do.

    say for e.g my matrix is
    0.76 1
    0 0.3

    now what i want to do is that, whenever the value in the matrix is greater than 0.25, i want to print 1 and if it is less than 0.25 than i want to print 0 and if it is 0 or 1 then let it be as it is....
    so the answer for my above matrix should be

    1 1
    0 0
  • Dheeraj Joshi
    Recognized Expert Top Contributor
    • Jul 2009
    • 1129

    #2
    Do you have a code for this?
    You can check the number inside a loop and determine the condition and change the value with 0 or 1.

    Regards
    Dheeraj Joshi

    Comment

    Working...