Mostrar comentarios más antiguos
Apologies for the rudimentary question, I'm very much a novice with Matlab. I am trying to set the x axis tick marks for a figure using XTick and it's not working. Can anyone tell me what I am missing here? The code is this:
figure
plot(damp1,'+r')
hold on
plot(damp2,'+r')
plot(lamp1,'ob')
plot(lamp2,'ob')
plot(mean,'xk' )
XTick = [0:1:6]
xlabel('Sample')
ylabel('Depth(m)')
legend('daily amplitude +','daily amplitude -','lunar amplitude +','lunar amplitude -','mean depth')
hold off
Respuesta aceptada
Más respuestas (2)
Jenny
el 27 de Sept. de 2011
0 votos
UJJWAL
el 27 de Sept. de 2011
0 votos
Hi Jenny,
In the program you have written you have not specified the variables. That is what you are storing in damp1, lamp1 etc is not specified. So that is a problem and may result in errors.
However even if you define all the variables, you should set Tick as follows :-
set(gca,'XTick',0:1:6); I am not describing the details as u r a new user. If you want to know more. just mail back to me
HAPPY TO HELP
UJJWAL
1 comentario
Jenny
el 27 de Sept. de 2011
Categorías
Más información sobre Performance and Memory en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!