MATLAB: How do you change the x scale of a plot to logs change scalelogsscale I am trying to make my plots x scale in logs i did it manually but don't know the code. Best Answer You can use semilogxhttps://www.mathworks.com/help/matlab/ref/semilogx.html Related SolutionsMATLAB: Log log plot Try this code:plot(log2(rand(100,1)*128))ytick = get(gca, 'YTick')str = cellstr( num2str(ytick(:),'2^{%d}') )format_ticks(gca,' ',str)format_ticks function you can download from:http://www.mathworks.com/matlabcentral/fileexchange/15986 MATLAB: How to set linear Y-axis with logarithm diagram Set the 'YScale' axis property to 'log'x = 1:10; y = x.^2; figureh = plot(x,y)set(gca, 'YScale', 'log') Related QuestionScatter3 in log-log-logHow changing the loglog scale x and y axisPlot in log-logLOG vs LOG10 plot
Best Answer