How do I plot a line against the y axis?
1 vue (au cours des 30 derniers jours)
Afficher commentaires plus anciens
AAS
le 8 Sep 2021
Réponse apportée : Star Strider
le 8 Sep 2021
I tried taking the transpose but it does not seem to work.![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/732814/image.png)
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/732814/image.png)
0 commentaires
Réponse acceptée
Star Strider
le 8 Sep 2021
I am not certain what you want to do.
Perhaps —
x = linspace(0, 2*pi);
y = sin(x);
subplot(2,1,1)
plot(x, y)
grid
ylim([-1 1]*1.1)
subplot(2,1,2)
plot(y, x)
grid
xlim([-1 1]*1.1)
Experiment to get different results.
.
0 commentaires
Plus de réponses (0)
Voir également
Catégories
En savoir plus sur 2-D and 3-D Plots dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!