Skip to main content
12 events
when toggle format what by license comment
Nov 6, 2022 at 14:49 vote accept Tugrul Temel
Aug 30, 2020 at 16:16 comment added Tugrul Temel I am very sorry. Your Code works. I confused you due to my inattention to the intervals. Now I tried it again and got the correct result. This part of the job is done. Thank you very much.
Aug 30, 2020 at 16:09 comment added Tugrul Temel I think the Code still has a problem. I give a 5 by 5 matrix in the question above, but the outcome of maP[...] is a totally different matrix. I noticed that still the very very early example 3 by 3 matrix is reproduced by maP[...].
Aug 30, 2020 at 15:59 comment added Tugrul Temel Now it works as expected. One tiny revision is needed to make sure that the thresholds (intervals) are in the form of [0, 0.5], (0.5, 1.0], (1.0, 1.5], etc. I like to make sure that upper values in intervals are closed (inclusive), while lower values (except zero in s1) are open (exclusive). Currently, I do not know the convention you implement.
Aug 30, 2020 at 15:29 comment added kglr @Tugrul, hope the new version works in general.
Aug 30, 2020 at 15:28 history edited kglr CC BY-SA 4.0
added 59 characters in body
Aug 30, 2020 at 14:41 comment added Tugrul Temel Your map function has a problem. It always gives me 3 by 3 matrix in the original example matrix I gave, although I run the code with a 5 by 5 matrix as in the edited question. It looks like the map code does not accept the new matrices m1S and m2S.
Aug 30, 2020 at 14:19 comment added Tugrul Temel Thank you very much. I also edited the question with a new matrix. I will try it and let you know.
Aug 30, 2020 at 14:02 comment added kglr @Tugrul, the new version of map should work for cases with zero transitions.
Aug 30, 2020 at 13:59 history edited kglr CC BY-SA 4.0
added 39 characters in body
Aug 30, 2020 at 13:48 comment added Tugrul Temel Thank you for a nice function. It works as expected if all the elements in map are positive, but it does not work if there is a zero transition from, say, s1 to s2. I will edit my question with a new pair of matrices and the intervals. You may try your Code with the example.
Aug 30, 2020 at 0:42 history answered kglr CC BY-SA 4.0