我正在尝试创建一个手套,当您将手腕向下转动时,它会以IR信号的形式发送1,如果您将手腕向上转动,它将返回0作为我使用javascript的手套:
input.onGesture(Gesture.TiltDown, function () {
music.playMelody("E B C5 A B G A F ", 262)
network.infraredSendNumber(1)
light.showRing(
`blue red blue red blue blue red blue red blue`)
})
input.onGesture(Gesture.Ti
我有一个颜色数组,我想转换成一个数字矩阵:
using Colors
cols = [RGB{Float64}(rand(), rand(), rand()) for i in 1:6]
6-element Array{ColorTypes.RGB{Float64},1}:
RGB{Float64}(0.836012,0.505908,0.249548)
RGB{Float64}(0.383172,0.105153,0.361422)
RGB{Float64}(0.680616,0.974232,0.942787)
RGB{Float64}(0.804829,0.825503,0.99022
现在所有的750个条目都在一行上,我怎样才能把它变成一列呢?
p = normal(1:750)-1;
我试过了:
columns = 1;
p = normal(1:750)-1;
p = p(1:columns);
我也尝试过:
rows = 1000;
p = normal(1:750)-1;
p = p(1:rows)';