if
if true % code
A=[1 2 3 0 0 4]B=[1 3 5 2 4 5]C=[1 56 65 65 65; 4 5 45 546 4; 54 54 51 21 21; 4 453 3645 534 4; 54 554 54 541 1]D= C(A,B)end
i want D to be zero when A is zero but it shows indexing is not valid
indexingmathematical
if true % code
A=[1 2 3 0 0 4]B=[1 3 5 2 4 5]C=[1 56 65 65 65; 4 5 45 546 4; 54 54 51 21 21; 4 453 3645 534 4; 54 554 54 541 1]D= C(A,B)end
Best Answer