Mapping continuous values onto a discrete spectrum
显示 更早的评论
I have an assignment I am really struggling with. We have a gray scale image (dimensions: AxBx1)). When given a number N, the number of intervalls, we are supposed to map all values to a single number. Here is an example for N=4:
[0.00 - 0.25] mapped to 0
[0.25 - 0.50] mapped to 0.3 repeating
[0.50 - 0.75] mapped to 0.6 repeating
[0.75 - 1.00] mapped to 1
I have figured out that if given the number N, then I need N-1 values to map those intervalls to. All I need is a function or some other way to do so, because we are not allowed to use loops or recursion. And I have no idea how to even begin programming this. I have already looked googled and couldn't find a answer.
回答(0 个)
类别
在 帮助中心 和 File Exchange 中查找有关 Descriptive Statistics 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!