I want to create a matrix like below. Basically I want to check row name is less than less than current column name and greater than previous column name. If condition is true then 1 else o.
94673160 946764000 946785600
946702800 1 0 0
946706400 1 0 0
946710000 1 0 0
946713600 1 0 0
946717200 1 0 0
946720800 1 0 0
946724400 1 0 0
946728000 1 0 0
946731600 0 1 0
946735200 0 1 0
946738800 0 1 0
946742400 0 1 0
946746000 0 1 0
946749600 0 1 0
946753200 0 1 0
946756800 0 1 0
946760400 0 0 1
946764000 0 0 1
946767600 0 0 1
946771200 0 0 1
946774800 0 0 1
946778400 0 0 1
946782000 0 0 1
946785600 0 0 1
adding image for reference