how to set the evenly spaced yaxis
16 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
Hi I have an excel file with 12 columns and I am reading the data and plotting it as follows but I am getting unevenly spaced Yaxis( find the attached figure). Please give me suggestions to overcome it.
data = xlsread('PLOTF1');
x = data(:,1);
y=data(:,2);
loglog(x,y,'k','linewidth',2.0)
hold on
y2 = data(:,3);
loglog(x,y2,'b','linewidth',2.0)
hold on
y3 = data(:,4);
loglog(x,y3,'r','linewidth',2.0)
hold on
y4 = data(:,5);
loglog(x,y4,'b','linewidth',2.0)
hold on
y5 = data(:,6);
loglog(x,y5,'y','linewidth',2.0)
hold on
y6 = data(:,7);
loglog(x,y6,'g','linewidth',2.0)
hold on
y7 = data(:,8);
loglog(x,y7,'m','linewidth',2.0)
hold on
y8 = data(:,9);
loglog(x,y8,'y-.','linewidth',2.0)
hold on
y9 = data(:,10);
loglog(x,y9,'r-.','linewidth',2.0)
hold on
y10 = data(:,11);
loglog(x,y10,'k-+','linewidth',0.2)
hold on
y11 = data(:,12);
loglog(x,y11,'k-.','linewidth',2.0)
hold off
% ylabel('Stress, [MPa]','fontsize',20);
ylabel('NSD(dBVrms/sqrt(Hz))','fontweight', 'bold', 'fontsize',12, 'fontname',
'arial');
xlabel('Frequency (Hz)','fontweight', 'bold', 'fontsize',12, 'fontname', 'arial');
axis([0 500 -90 -10]);
I have also tried logspace and linespace functions.

3 commentaires
Réponse acceptée
NANDEESH
le 26 Sep 2017
Modifié(e) : NANDEESH
le 26 Sep 2017
1 commentaire
Stephen23
le 30 Sep 2017
@NANDEESH@ using semilogx would be simpler. When you scroll to the bottom of loglog you will find a list of "See Also" functions, which you might like to spend a few minutes reading through the help of.
Voir également
Catégories
En savoir plus sur Matrices and Arrays 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!
