how to mirror plot "around zero" on x axis

조회 수: 5 (최근 30일)
Belal Ahmed
Belal Ahmed 2022년 5월 7일
댓글: Voss 2022년 5월 7일
I mean if I have frequency axis or time axis [x - axis] = from 0 to 50 for example,
how to plot same axis byt reserved in negative >>>> from -50 to o ?!

채택된 답변

Voss
Voss 2022년 5월 7일
t = 0:0.1:50;
y = sin(2*pi*t/10)+0.005*t.*randn(1,numel(t)); % some random signal
plot(t,y) % original signal
hold on
plot(-t,y) % "mirrored" signal
  댓글 수: 2
Belal Ahmed
Belal Ahmed 2022년 5월 7일
it works !
thank you so much
Voss
Voss 2022년 5월 7일
You're welcome!

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 2-D and 3-D Plots에 대해 자세히 알아보기

제품


릴리스

R2021a

Community Treasure Hunt

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

Start Hunting!

Translated by