plot with a few sample marked.
1 view (last 30 days)
May I ask your help? I would like to plot with a few samples marked out in matlab.
For example, I want to plot a cos function
But how can I mark the points with amplitude smaller than 0.5 with, for example, bubbles?
Thank you team!
Star Strider on 17 Nov 2019
y = cos(x);
L1 = y <= 0.5; % Logical Index: y <= 0.5
plot(x(L1), y(L1), 'o')
L2 = abs(y) < 0.5; % Logical Index: y <= 0.5 & y >= -0.5
plot(x(L2), y(L2), 'o')
Experiment to get different results.