I am trying to custom x axis values on my code. Please help

2 vues (au cours des 30 derniers jours)
Sam17
Sam17 le 3 Déc 2017
Here is my code
clc;
clear all;
M= [1 10 100 1000 10000 100000 1000000]
%for short term
delta= [ 3 4 5 6]
cp= delta/3
%For Short Term p
p_short= 2* normcdf(-3*cp)
%Using bionomial distribution for M=1 and M=10
for i=1:2
Y(i,:)=(1-p_short).^M(i)
end
%Using Poission Distribution for M= 100 and higher
for i=3:7
Y(i,:)= exp(-p_short.*M(i));
end
%Plot for Short Term p
Z(:,:)= Y*100
plot(M,Z,'LineWidth',2);
xlabel('Complexity');
set(gca,'xlabeltick',{'1','10','100','1000','10000','1000000'})
ylabel('Rolled Throughputyeild %');
The line set(gca,'xlabeltick',{'1','10','100','1000','10000','1000000'}) does not work.
Here is the error: Error using hg.axes/set The name 'xlabeltick' is not an accessible property for an instance of class 'axes'.
Error in reliability4 (line 21) set(gca,'xlabeltick',{'1','10','100','1000','10000','1000000'})

Réponse acceptée

Walter Roberson
Walter Roberson le 3 Déc 2017
xticklabel not xlabeltick

Plus de réponses (0)

Catégories

En savoir plus sur Creating, Deleting, and Querying Graphics Objects 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!

Translated by