summaryrefslogtreecommitdiff
path: root/3544/CH3/EX3.34/Ex3_34.sce
blob: d062f4353ada3e1fbc081e08d2fa15f54aec0af5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19

x = [1 0 1 1 0 1]

disp("Row: ")
row = [x(1),x(6)]
printf("in binary - %d%d",row)

//Convert to decimal
printf("\nin decimal - %d",bin2dec(strcat([string(row)])))

disp("")

disp("Column: ")
col = x(2:5)
printf("in binary - %d%d%d%d",col)

//Convert to decimal
printf("\nin decimal - %d",bin2dec(strcat([string(col)])))