array element concatenation, blank remove
显示 更早的评论
p=[1,0,0,0,0,0,1,0]
p=
1 0 0 0 0 0 1 0
This is 1 row,1 colimn
I wnat to make
p=
10000010
, blank removed. This is 1 row, 1 colimn
采纳的回答
更多回答(1 个)
p=[1,0,0,0,0,0,1,0];
n = length(p);
q = sum(p.*10.^(n-1:-1:0))
类别
在 帮助中心 和 File Exchange 中查找有关 MATLAB Coder 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!