1

I have an array like [ 1, 0, 0, 0 ] that i would like to convert to a number using bin2dec, is there a way to do it like with dec2bin, where you just use -'0' or would I have to go trough string operations?

1

1 Answer 1

0

I've managed to dig it out, for anyone looking this can be done using bin2dec(num2str(binary))

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.