how shall i compare and carry the first column element to other column?

1 次查看(过去 30 天)
i have a matrix
A=[1 1 0 1;
1 0 0 1;
1 1 1 1]
but it must be AA= [1 1 0 1;1 1 0 1;1 1 0 1] so by comparing both where ever there is a bit error. i am considering a matrix having B=[1 1 1 1;1 1 1 1; 1 1 1 1] where where ever the bit error as 1 became 0 or 0 became 1 will be found there a amount of 0.3 will b deduced as here in first column as by adding we get 3 and in second after deducing the bit error amount its 3-2.7=0.3 will be added to rest correct bit. when once error occurs the next column changes will be taken place on the previous one. in above example i want the result as
B=[1 1+0.15 1.15+0.15 1.30;
1 1-0.30 0.7+0.15 0.85;
1 1+0.15 1.15-0.3 0.85]
B=[1 1.15 1.30 1.30;
1 0.7 0.85 0.85;
1 1.15 0.85 0.85]

回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Loops and Conditional Statements 的更多信息

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by