What does this line really do?

1 view (last 30 days)
a(1,a == 1) = -1;
a(1,a == 0) = 1;
I am not sure what does this line really do? Can someone explain to me?
2- Does anyone know the function of correlation, auto and cross? I want to build smooth function.

Sign in to comment.

Accepted Answer

David Hill
David Hill on 6 Dec 2021
Look at what this does.
a(a==1)=-1%same as a(1,a==1)=-1
a(a==0)=1%same as a(1,a==0)=1;

More Answers (0)

Community Treasure Hunt

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

Start Hunting!