drawing a digital signal
Using matlab can we draw a digital signal 开发者_如何转开发out of an array that contains numbers ? Is there a way to convert each number to binary "dec2bin" and then draw it ?
You can use dec2bin
, but remember that this gives you a set of strings, i.e. character data. So do the following:
dec2bin(x, NUM_BITS) - '0'
You can now plot each column of this.
精彩评论