s=[0 1]; Let k{1,2}{1,1}=01010001,k{1,2}{1,2}=11010101,k{1,2}{1,3}=01010001,k{1,2}{1,4}=11010001,{1,2}{1,5}=00010001(continued upto {1,2}{1,7})

if (strcmp(k{1,2}{1,1}, '00000001') (strcmp(k{1,2}{1,1}, '10000000')))&& s(1)==0 p{i,j}='00000001';

elseif (strcmp(k{1,2}{1,1}, '00000001') (strcmp(k{1,2}{1,1}, '10000000')))&& s(1)==1 p{i,j}='10000000';

elseif (strcmp(k{1,2}{1,2}, '0000001') (strcmp(k{1,2}{1,2}, '1000000')))&& s(1)==0 p{i,j}='0000001';

elseif (strcmp(k{1,2}{1,2}, '0000001') (strcmp(k{1,2}{1,2}, '1000000')))&& s(1)==1 p{i,j}='1000000';

elseif (strcmp(k{1,2}{1,3}, '000001') (strcmp(k{1,2}{1,3}, '100000')))&& s(1)==0 p{i,j}='000001';

elseif (strcmp(k{1,2}{1,3}, '000001') (strcmp(k{1,2}{1,3}, '100000')))&& s(1)==1 p{i,j}='100000';

elseif (strcmp(k{1,2}{1,4}, '00001') (strcmp(k{1,2}{1,4}, '10000')))&& s(1)==0 p{i,j}='00001';

elseif (strcmp(k{1,2}{1,4}, '00001') (strcmp(k{1,2}{1,4}, '10000')))&& s(1)==1 p{i,j}='10000';

elseif (strcmp(k{1,2}{1,5}, '0001') (strcmp(k{1,2}{1,5}, '1000')))&& s(1)==0 p{i,j}='0001';

elseif (strcmp(k{1,2}{1,5}, '0001') (strcmp(k{1,2}{1,5}, '1000')))&& s(1)==1 p{i,j}='1000';

it is running fine as expected but what i want is

suppose at the condition

>> elseif (strcmp(k{1,2}{1,5}, '0001') || (strcmp(k{1,2}{1,5}, '1000')))&& s(1)==1 is met.

i want p{i,j}= '00011000'i.e it should contain the value '1000' and its before original values also. similarly for other cases also. kindly can anybody suggest and help me.

More Aditya Kumar Sahu's questions See All
Similar questions and discussions