Buildind special vector? V(3)=V(6)=V(9)...=0
1 次查看(过去 30 天)
显示 更早的评论
How can I build
V=[1 1 0 1 1 0 1 1 0 1 1 0....]vector.I want to put N value and it will reply me V vector..
Elements fo V will be V(3)=V(6)=V(9)...=0
1 个评论
更多回答(1 个)
Azzi Abdelmalek
2013-3-6
编辑:Azzi Abdelmalek
2013-3-6
V=[1 1 0 1 1 0 1 1 0 1 1 0]
N=3
V(N:N:end)=0
0 个评论
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Characters and Strings 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!