How can I reflect a signal on Y-Axis?

19 views (last 30 days)
I would like to know how to reflect any signal only on the Y-Axis
  3 Comments
Ahmed Mahmoud
Ahmed Mahmoud on 26 May 2020
What if my input that I want to reflect is not 2x2 matrix?
Adam Danz
Adam Danz on 26 May 2020
@Ahmed Mahmoud , the example in the link that Mohammad shared shows data that are not in a 2x2 matrix. Take some time to study the example. You'll see a 2x5 matrix containg 5 [X;Y] coordinates.
@Mohammad Sami, consider copying your comment to the answers section so you get credit for a good answer.

Sign in to comment.

Accepted Answer

Mohammad Sami
Mohammad Sami on 26 May 2020
You can multiply the reflection matrix with 2xn matrix of x,y coordinates.
x = [0 1 2 3 4 5];
y = [0 1 2 3 4 5];
reflectionmatrix = [-1 0; 0 1];
rm = reflectionmatrix * [x;y];
rx = rm(1,:);
ry = rm(2,:);

More Answers (0)

Community Treasure Hunt

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

Start Hunting!