how to separate two graphe in one figure
Afficher commentaires plus anciens
how to separate two graphe in one figure like this picture in matlab
Réponse acceptée
Plus de réponses (1)
Image Analyst
le 26 Nov 2024
0 votes
If you want one plot or surface to be "lifted" above the other, you can add an offset to the one you want shifted. Be aware that the axes units will not align with the original units, but with the shifted units.
4 commentaires
Belaid
le 28 Nov 2024
x = linspace(0, 5*pi, 100);
y1 = cos(x);
y2 = sin(x);
y2Lifted = y2 + 3; % Raise it up by 3 units.
plot(x, y1, 'b-', 'LineWidth', 3);
hold on;
plot(x, y2, 'r-', 'LineWidth', 3);
plot(x, y2Lifted, 'm-', 'LineWidth', 3);
legend('y1', 'y2', 'y2Lifted', 'Location', 'west');
grid on;
To learn other fundamental concepts, invest 2 hours of your time here:
Belaid
le 29 Nov 2024
Modifié(e) : Image Analyst
le 29 Nov 2024
Image Analyst
le 29 Nov 2024
I don't understand the question. What is t? Is it x or y? And if it's one of those, what value would the other x or y have? Maybe you should start your own question rather than continue here in @Belaid Boutqlmount's question (for which he'll get emails about).
Catégories
En savoir plus sur 2-D and 3-D Plots dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!



