How to change the x-axis step size?
I have this code, everything is fine but I tried to change x-axis step size in order to be 1 instead of 0.5, but it didn’t work!
clear;
SF=[12 11 10 9 8 7];
TOA=[1318.91 741.38 370.69 185.34 102.91 56.58];
R_b=[0.29 0.54 0.98 1.76 3.12 5.47];
%Plotting
set ( gca, ‘xdir’, ‘reverse’ )
yyaxis left
stairs(SF,TOA,’-.’)
title(‘Distance <—-‘)
xlabel(‘SF’)
ylabel(‘TOA (msec)’)
yyaxis right
stairs(SF,R_b,’r’)
ylabel(‘Data Rate (kbps)’)
legend(‘TOA’,’Data Rate’)
gridI have this code, everything is fine but I tried to change x-axis step size in order to be 1 instead of 0.5, but it didn’t work!
clear;
SF=[12 11 10 9 8 7];
TOA=[1318.91 741.38 370.69 185.34 102.91 56.58];
R_b=[0.29 0.54 0.98 1.76 3.12 5.47];
%Plotting
set ( gca, ‘xdir’, ‘reverse’ )
yyaxis left
stairs(SF,TOA,’-.’)
title(‘Distance <—-‘)
xlabel(‘SF’)
ylabel(‘TOA (msec)’)
yyaxis right
stairs(SF,R_b,’r’)
ylabel(‘Data Rate (kbps)’)
legend(‘TOA’,’Data Rate’)
grid I have this code, everything is fine but I tried to change x-axis step size in order to be 1 instead of 0.5, but it didn’t work!
clear;
SF=[12 11 10 9 8 7];
TOA=[1318.91 741.38 370.69 185.34 102.91 56.58];
R_b=[0.29 0.54 0.98 1.76 3.12 5.47];
%Plotting
set ( gca, ‘xdir’, ‘reverse’ )
yyaxis left
stairs(SF,TOA,’-.’)
title(‘Distance <—-‘)
xlabel(‘SF’)
ylabel(‘TOA (msec)’)
yyaxis right
stairs(SF,R_b,’r’)
ylabel(‘Data Rate (kbps)’)
legend(‘TOA’,’Data Rate’)
grid x-axis, step-size MATLAB Answers — New Questions