JMP 14.2 联机文档
发现 JMP
使用 JMP
基本分析
基本绘图
刻画器指南
实验设计指南
拟合线性模型
预测和专业建模
多元方法
质量和过程方法
可靠性和生存方法
消费者研究
Scripting Guide
JSL Syntax Reference
该帮助的版本不再更新,请参见
https://www.jmp.com/support/help/zh-cn/15.2
获取最新的版本.
Scripting Guide
•
Data Structures
•
Lists
• Iterate through a List
上一个
•
下一个
Iterate through a List
Iterate through a list to do something with each value or look for a particular value. The following script looks at each item in the list. If the item in the list is less than or equal to 10, it is replaced with its square.
x = {
2
,
12
,
8
,
5
,
18
,
25
};
n =
N Items
( x );
For
( i =
1
, i <= n, i++,
If
( x[i] <=
10
,
x[i] = x[i] ^
2
)
);
Show
( x );
x = {4, 12, 64, 25, 18, 25};
You can use
Loc()
to locate the items in the new list that are equal to 25:
Loc
( x,
25
);
[4, 6] // The fourth and sixth items in the list are equal to 25.