Plotting graph with variables on x axis
6 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
Vinay Srinivasan
le 17 Oct 2019
Commenté : Vinay Srinivasan
le 17 Oct 2019
Hello all,
I want to plot graph with my x axis as 0 to 1d with intervals 0.2 .It should look like [0,0.2d,0.4d,0.6d,0.8d,1d]
What code I shoul give .
0 commentaires
Réponse acceptée
Bjorn Gustavsson
le 17 Oct 2019
Something like this:
y = randn(123,1);
x = linspace(0,1,123);
plot(x,y)
xtstr = {'0','0.2d','0.4d','0.6d','0.8d','1d'};
set(gca,'xtick',0:0.2.1,'xticklabel',xtstr)
HTH
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!