Changing numbers near X-axis when plotting
Afficher commentaires plus anciens
Hi, I import some computation results (single dimension arrays) to Matlab and trying to plot them. However I don't want X-axis labels to be shown as array indexes, I need them to be shown as [Array index]*some_number.
Those computations are are obtained from a difference scheme (uniform grid), for example:
I have X-segment [0,10] and 101 points in my scheme (covering the whole segment with a step 0.1), so as a result I get an array res_1,res_2,...res_99,res_101.
I read it via dlmread(res) and plot, thus getting X-axis labels: 1,2,...,99,101.
But I'd like to have X-axis labels to be shown as: 0,0.1,...,9.9,10.
It seems I should include multiplication of each number on X-axis when drawing X-axis labels (multiplying by step of the grid, 0.1 in current example), but I can't figure how to do this.
Thanks.
Réponse acceptée
Plus de réponses (0)
Catégories
En savoir plus sur Axis Labels 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!