Log log plot
11 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
I have a set of data wich I want to plot in a log scale, not with the base 10, but with the base 2. How can I do that?
0 comentarios
Respuesta aceptada
Grzegorz Knor
el 17 de En. de 2012
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:
0 comentarios
Más respuestas (1)
C.J. Harris
el 17 de En. de 2012
See:
doc loglog
2 comentarios
C.J. Harris
el 17 de En. de 2012
log10/log2 is a constant, so can't you simply modify the axis labels?
Ver también
Categorías
Más información sobre Annotations en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!