how to get higher bits using matlab?

Status
Not open for further replies.

hodahussein

Full Member level 2
Joined
Apr 17, 2007
Messages
144
Helped
2
Reputation
4
Reaction score
2
Trophy points
1,298
Activity points
2,276
dear all

i have matrix 45*67 in matlab,each element represented by 8bit, i want to convert it to hex so by using dec2hex this matrix converted to 3015*2 OK, but i need to anding(loicg and) it with 0xF0 to obtain higher bits or how can i remove lower bits?
could any one help me ?

wait your reply
regards
 

You needn't to do the binary conversion, you can just do:
Code:
floor(x/16)
where x is your array.
 
Last edited:

Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…