问题
With Open-BCI, i got values (sampled at 255Hz) that i want to plot on matlab. However, i would like specific ticks on the x axis (i think it's the correct term) to match the acquisition protocol. It follows a 6-2-6-2 seconds pattern. What i mean is :
- T=0s => xtick="Image1"
- T=6s => xtick="Image2"
- T=8s => xtick="Image3"
- T=14s => xtick="Image4"
- T=16s => xtick="Image5"
etc...
I want to plot the whole signal, and then change the X axis ticks to show only those values. However i struggle with matlab, so i have no idea how to do that. I'm not sure it's even possible.
Thank you, if you could help me
回答1:
Try setting your desired ticks in a matrix (e.g., "myticks" below).
x = [1 2 3 4 5];
figure
plot(x,x)
myticks = [1 3 3.5 4];
xticks(myticks)
yields this:
来源:https://stackoverflow.com/questions/55314903/how-can-i-set-a-specific-and-irregular-tick-on-a-matlab-axis