How to mirror a plot ?

Hi
I need a help, i want to mirror a plotaround y axis, but still have the same axis, can anybody help?
I have upload the plot as attachments.

2 个评论

try this
plot(-x(:,1), y(:,2));
but then x axis is negativ.

请先登录,再进行评论。

 采纳的回答

Ankit
Ankit 2020-2-24
编辑:Ankit 2020-2-24
After your plot command, add the below line:
set(gca, 'XDir','reverse')

5 个评论

You can accept the answer if it served your purpose!
How can i mirror a duplicate? I mean having the first curve and the mirrored one in the same plot, Can it be done with a fplot?
?
x = -10:20;
y = x/10;
% the regular plot
plot(x,y,'k'); hold on
% the same series, but flipped on x
plot(-x,y,'b:')

请先登录,再进行评论。

更多回答(0 个)

类别

帮助中心File Exchange 中查找有关 Fourier Analysis and Filtering 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by