Graph with similar axis value with the value given
2 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
Good Afternoon, I'm a newbie in matlab.
I have these two groups of value
y = [733.3036 723.4694 717.7095 713.5816 711.1634 709.3579 708.2943 707.9351 708.3573 709.3768 711.9425 713.9145 717.3444 722.2313];
x = [0.5 0.6 0.7 0.8 0.9 0.91 0.92 0.93 0.94 0.95 0.96 0.97 0.98 0.99];
I want the graph shows me the specific axis range (similar with the x and y value given) that is [0.5 0.6 0.7 0.8 0.9 0.91 0.92 0.93 0.94 0.95 0.96 0.97 0.98 0.99] and [733.3036 723.4694 717.7095 713.5816 711.1634 709.3579 708.2943 707.9351 708.3573 709.3768 711.9425 713.9145 717.3444 722.2313].
because whenever plot it directly with plot(x,y), the value appeared was unmatched with the value given (i.e x = 0.5 0.55.....) so the coordinate wouldn't be matched.
Would anyone wanna help me? thank you.
0 commentaires
Réponses (1)
Daniel Pollard
le 3 Fév 2021
You want xticks and yticks.
As a note: you need the vectors to be in ascending order, and your second tickmark vector isn't. sort should help there.
0 commentaires
Voir également
Catégories
En savoir plus sur 2-D and 3-D Plots dans Help Center et File Exchange
Produits
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!