Manipulate binary element in matrix
1 Ansicht (letzte 30 Tage)
Ältere Kommentare anzeigen
zahrein yaacob
am 6 Jul. 2019
Kommentiert: zahrein yaacob
am 9 Jul. 2019
Hi If i have binary digits in the element.How do i choose element bit 5 to bit 8.
A= 010101010
This A is in binary format.
0 Kommentare
Akzeptierte Antwort
KALYAN ACHARJYA
am 6 Jul. 2019
Bearbeitet: KALYAN ACHARJYA
am 6 Jul. 2019
bin_num=str2num(A);
bin_array=num2str(bin_num)-'0';
bits_selection=bin_array(5:8)
or
bin_data=A-'0'
bits_selection=bin_data(5:8)
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Get Started with MATLAB finden Sie in Help Center und File Exchange
Produkte
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!