生成向量X= (1,2,3,4,5,6,7,8,9,10)的命令是
A: X<-c(1:10)
B: X<-c[1:10]
C: X<-c(1,10)
D: X<-c(1.10)
A: X<-c(1:10)
B: X<-c[1:10]
C: X<-c(1,10)
D: X<-c(1.10)
举一反三
- 用seq函数,生成向量X= (1,2,3,4,5,6,7,8,9,10)的命令是 A: X<-seq[1:10] B: X<-seq(1, by = 1, length.out = 1) C: X<-seq(1, by = 10, length.out = 1) D: X<-seq(1, by = 1, length.out = 10)
- 数学关系式3≤X<10表示成正确的VB表达式为( ) A: 3<=X<10 B: 3>=X AND X<10 C: X>=3 OR X<10 D: 3>=X AND <10
- “x是小于10 的非负数”,用MATLAB表达式可写为( ) A: 0<=x<10 B: 0<=x& x<10 C: 0<=x or x<10 D: 0=<x and x<10
- 以下哪个表达式表示“当 x 的取值在 [-10, 0] 的范围内,结果为真,否则为假” A: x>=-10&&x<=0 B: x<=0&&x>=-10 C: !(x<-10||x>0) D: -10 <=x<=0 E: -10 <x<0 F: x in [-10, 0]
- 向量X= (1,2,3,4,5,6,7,8,9,10),删除向量X的第3个元素的命令是 A: X<-X<-4> B: X<-X (4) C: X<-X (-4) D: X<-X [-4]