필터 지우기
필터 지우기

Mirror image/plot flip

조회 수: 85 (최근 30일)
Grace
Grace 2022년 9월 4일
댓글: Grace 2022년 9월 4일
I want to plot the mirror image of a cubic curve.
In other words, I intend to flip the plot, but I do not want the x- axis to change.
This is my code and the plot. Thank you
clear all;close all;clc;
x=linspace(0, 100);
y=x.^3;
plot(x,y,'LineWidth', 2);set(gca,'xdir','reverse')

채택된 답변

Walter Roberson
Walter Roberson 2022년 9월 4일
clear all;close all;clc;
x=linspace(0, 100);
y=x.^3;
plot(x,fliplr(y),'LineWidth', 2);set(gca,'xdir','reverse')
  댓글 수: 5
Walter Roberson
Walter Roberson 2022년 9월 4일
... but that is the one you started with ??
Grace
Grace 2022년 9월 4일
I meant the seond plot (without counting the 'original plot')

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

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Surface and Mesh Plots에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by