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

2 Ansichten (letzte 30 Tage)
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'})

Akzeptierte Antwort

Walter Roberson
Walter Roberson am 3 Dez. 2017
xticklabel not xlabeltick

Weitere Antworten (0)

Kategorien

Mehr zu Creating, Deleting, and Querying Graphics Objects finden Sie in Help Center und File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by