I am trying to flip the last plot so it can fit into the other plots
f = @(x) x.^3;
g = @(x)x;
a = 0;
b =1;
fplot(f, [a, b]), hold on
fplot(g, [a, b], 'LineWidth',2)
xline(2)
ycoord = linspace(a, b, 20);
xcoord = [f(ycoord); g(ycoord)];
plot(xcoord, [ycoord;ycoord]), hold off
^^ this plot

 채택된 답변

Bruno Luong
Bruno Luong 2022년 11월 4일

1 개 추천

f = @(x) x.^3;
ivf = @(y) y.^(1/3);
g = @(x)x;
ivg = @(y) y;
a = 0;
b =1;
fplot(f, [a, b]), hold on
fplot(g, [a, b], 'LineWidth',2)
xline(2)
ycoord = linspace(a, b, 20);
xcoord = [ivf(ycoord); ivg(ycoord)];
plot(xcoord, [ycoord;ycoord]), hold off

댓글 수: 1

Ibraheem
Ibraheem 2022년 11월 4일
Can you please also help me with this

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

추가 답변 (0개)

카테고리

질문:

2022년 11월 4일

댓글:

2022년 11월 4일

Community Treasure Hunt

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

Start Hunting!

Translated by