i have a large matrix whose elements is 1 and 0; how to conver each row to decimal ,like bin2dec

i do it like this
if true
rownum = size(Qbinnum,1);
for i = 1:rownum
cgroup(i)=bin2dec(num2str(Qbinnum(i,:)));
end
end
as the matrix is big, so it takes a lot of seconds ,any way easier ,less time ways?

 채택된 답변

추가 답변 (1개)

What does this say
whos Qbinnum

댓글 수: 1

Qbinnum is a big size matrix ,like this [1 0 0 1 1 1; 1 0 0 1 1 1; 1 0 0 1 1 0; 1 0 1 1 1 1; ... 1 1 1 1 1 1; 0 1 0 1 0 0 ]

댓글을 달려면 로그인하십시오.

카테고리

도움말 센터 및 File Exchange에서 MATLAB에 대해 자세히 알아보기

태그

질문:

2014년 9월 15일

댓글:

2014년 9월 15일

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by