change appearing values one X- axis only
Afficher commentaires plus anciens
Hi to all; when plotting in matlab, matlab is automatically giving the values on the X axis form 0 to 300 depending on the number (size) of data I plot (Y size); i want to change these values appearing on the X axis; let us say i want values from 100 to 200 to appear on the X axis ; How can i do so ?
Thank you for ur answer
regards
Réponse acceptée
Plus de réponses (1)
Azzi Abdelmalek
le 15 Août 2012
Modifié(e) : Azzi Abdelmalek
le 15 Août 2012
it seems that you are using
plot(y)
%example
y=sin(0:0.1:10);
plot(y); % x axis are from 1 to length(y)
% if i want it from 100 to 200
x=linspace(100,200,length(y))
figure;plot(x,y)
Catégories
En savoir plus sur Graphics Object Programming 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!