dictionary - Mathematica 中条件查询的映射选择

标签 dictionary select wolfram-mathematica

使用以下列表,

list = {{a, b, c, d}, {1, 2, 3, 4}, {5, 6, 7, 8}};

是否可以选择第二个值 >3 的列表。下面所需的输出
{5, 6, 7, 8}

调整以下代码,当前提取列表中所有 >2 的值
Select[#, # > 2 &] & /@ list[[2 ;;]

可在此处找到复杂的查询解决方案 Conditional Data Manipulation in Mathematica

最佳答案

或者,使用 Select

Select[list, #[[2]] > 3 &]

输出
{{5, 6, 7, 8}}

关于dictionary - Mathematica 中条件查询的映射选择,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/6234828/

相关文章:

javascript - 未定义的属性 'map' (JavaScript)

c# - 检测哈希表或字典中的重新散列或冲突

python - 匹配新字典中的字典键和值

mysql - 在mysql中创建一个复杂的变量

wolfram-mathematica - 在Mathematica中使用BinCounts或直方图进行FindFit

dictionary - 带有字典的 Entity Framework 4 POCO

php - PDO 查询始终返回 1 或 true

sql - 选择第一个和最后一个元素的最有效方法,SQLite?

wolfram-mathematica - 标签加号 protected

wolfram-mathematica - 更改后更新(重新加载)mathematica 包