Convert a vector to single element
이전 댓글 표시
Hey
could someone tell me how to convert an vector to single element?
My code :
signal = [0];
for i = 1:255-1
signal(i) = dec2bin(i,8)
end
i get this error "the error is " Unable to perform assignment because the left and right sides have a different number of elements."
i want to get this result
singal = [0000000,00000001,00000010,.............. Ets ]
how could do that ?
and thank you :D
채택된 답변
추가 답변 (1개)
darova
2020년 2월 22일
Use cells
signal = cell(254,1);
for i = 1:255-1
signal{i} = dec2bin(i,8);
end
카테고리
도움말 센터 및 File Exchange에서 Dates and Time에 대해 자세히 알아보기
제품
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!