How to show only parts of a function in a plot, in order to combine functions?
Mostra commenti meno recenti
Hi everyone,
I need some help with this. I got three functions, but I want to plot only part of them and stich them together. This is the code and the figure. So I want the blue line to go up to the intersection with the red line (1,0101,1,0203) and I want the other two plots to not show in this region. Then, from that intersection point, I want the red line to go up to the intersection (5,4545, 3,5692) while omiting the other functions in this interval and thirdly, after this interaction, I want the graph to show only the black line. Is that possible?

x=linspace(0,20)
y=x.^4.*exp(-x);
plot(x,y,'k')
grid on
hold on
y=x.^(3/4);
plot(x,y,'r')
axis([ 0 20 10^(-2) 10^2])
hold on
y=x.^2;
plot(x,y,'b')
set(gca, 'YScale', 'log')
set(gca, 'XScale', 'log')
3 Commenti
darova
il 30 Giu 2020
Can you make a simple sketch of the result picture?
Maxtron Moon
il 30 Giu 2020
darova
il 30 Giu 2020
Do you have this program?

Risposta accettata
Più risposte (0)
Categorie
Scopri di più su Image Arithmetic in Centro assistenza e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!

