ismembertol: What am I doing wrong?
1 次查看(过去 30 天)
显示 更早的评论
x is attached. "Transparency" looks ok but "Lia" is all zero. Any idea what I'm doing wrong here?
Transparency = find (x>=0.9 | x<=0.8);
[Lia,~] = ismembertol (x, Transparency,1e-16);
采纳的回答
Steven Lord
2022-3-14
Based on your comment describing the problem you're trying to solve: "The idea is to make the elements that fall outside a range transparent. That's why there is OR. Bigger than a certain value, smaller than a certain value. You can pick any number. 4 and 6 are arbitrary." I think you've overcomplicated the problem. If all you want is a vector of true or false values depending on whether or not the values in x are in your range you need neither ismembertol nor find.
rng(6, 'twister') % Seed chosen so there are multiple elements in range
x = rand(10, 1); % Sample data
tooSmall = x <= 0.8;
tooLarge = x >= 0.9;
justRight = ~tooSmall & ~tooLarge;
Let's look at the results as a table.
t = table(x, tooSmall, tooLarge, justRight)
If we were to use justRight to index into x, we'd get two elements.
x(justRight)
If we were to use tooSmall and tooLarge to index into x, we could get the other eight elements.
x(tooSmall | tooLarge)
2 个评论
Pelajar UM
2022-3-14
编辑:Pelajar UM
2022-3-14
I still wonder why ismember and find are not working consistently across different data sets but you are absolutely right. This method is far simpler and more robust too. Thanks a lot.
Steven Lord
2022-3-14
In your original ismembertol call, you're asking for the intersection between raw data and indices of some of the values in the raw data. That doesn't make conceptual sense to me. I think that disconnect is the reason the behavior doesn't seem to be "working consistently".
更多回答(2 个)
Arif Hoq
2022-3-14
编辑:Arif Hoq
2022-3-14
try this:
x=readmatrix('x.txt');
Transparency = x(x>=0.9 | x<=0.8);
[Lia,~] = ismembertol (x, Transparency,1e-16)
Lia = 35526×1 logical array
1
0
1
1
0
1
0
1
0
1
1
0
1
1
0
1
1
1
1
0
1
1
0
1
0
1
1
1
1
1
1
1
1
1
1
1
0
1
1
1
0
0
0
1
1
0
0
1
1
0
1
0
1
0
1
0
0
0
0
0
1
1
1
1
0
1
0
0
0
1
0
1
1
0
1
1
1
1
0
1
1
0
1
1
1
0
1
0
1
1
0
1
0
1
1
0
0
0
0
0
1
1
1
0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
1
1
0
1
1
0
1
1
0
1
0
0
1
0
1
1
1
1
1
1
1
1
1
1
1
1
0
1
1
1
0
1
1
1
0
0
1
0
1
1
0
1
1
1
1
1
1
1
1
0
1
0
0
0
0
1
1
1
1
0
1
1
1
0
0
1
0
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
0
1
1
0
0
1
1
1
1
1
5 个评论
Pelajar UM
2022-3-14
编辑:Pelajar UM
2022-3-14
t=readmatrix('t.txt');
Transparency = t (t>=6 | t<=4);
[Lia,~] = ismembertol (t, Transparency,1e-16);
Thanks. It worked for x, but it doesn't work for t ("find" works for this one though).
I don't understand why...
Arif Hoq
2022-3-14
first: your file name is x.txt, not t.txt
second: all the values of x.txt is less than 1, but your logical expression is less than 4 and greater than 6 which is out of range of x.txt.
so it would not work
Arif Hoq
2022-3-14
i dont now about your expectation. I guess you trying to find the value x between 4 and 6, so try this
Transparency=t(t>=4 & t<=6)
Pelajar UM
2022-3-14
The idea is to make the elements that fall outside a range transparent. That's why there is OR. Bigger than a certain value, smaller than a certain value. You can pick any number. 4 and 6 are arbitrary.
Jan
2022-3-14
find() replies the indices of the non-zero elements. Indices are positive integers >= 1.
ismembertol(x, Transparency, 1e-16) searchs for elements of x, which are less than 1e-16 apart from any index stored in Transparency. None of the elements of x is close enough to 1, and 1 is the smallest possible value of Transparency. You have confused indices and the corresponding values.
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Data Distribution Plots 的更多信息
标签
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!发生错误
由于页面发生更改,无法完成操作。请重新加载页面以查看其更新后的状态。
您也可以从以下列表中选择网站:
如何获得最佳网站性能
选择中国网站(中文或英文)以获得最佳网站性能。其他 MathWorks 国家/地区网站并未针对您所在位置的访问进行优化。
美洲
- América Latina (Español)
- Canada (English)
- United States (English)
欧洲
- Belgium (English)
- Denmark (English)
- Deutschland (Deutsch)
- España (Español)
- Finland (English)
- France (Français)
- Ireland (English)
- Italia (Italiano)
- Luxembourg (English)
- Netherlands (English)
- Norway (English)
- Österreich (Deutsch)
- Portugal (English)
- Sweden (English)
- Switzerland
- United Kingdom(English)
亚太
- Australia (English)
- India (English)
- New Zealand (English)
- 中国
- 日本Japanese (日本語)
- 한국Korean (한국어)