How to shift elements in a row matrix?
显示 更早的评论
Suppose i have a vector x=[1 1 1 1 0 0 1 1] i want 1 bit shifting such that the output is x1=[0 1 1 1 1 0 0 1] x2=[0 0 1 1 1 1 0 0]
How to do this??
采纳的回答
更多回答(1 个)
Matt J
2017-10-20
x1=zeros(size(x));
x1(2:end)=x(1:end-1)
4 个评论
Darsana P M
2017-10-20
Matt J
2017-10-20
Why not?
Darsana P M
2017-10-21
Anu
2018-8-25
i want this code to execute for every iterations.I need to run it for 64 times and i need to display from 1to 64.how could i do this?
类别
在 帮助中心 和 File Exchange 中查找有关 Array and Matrix Mathematics 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!