how to find witch points are under the line??i have a number of points that i define as a X,Y and i have wrotten the under steps.
1 visualización (últimos 30 días)
Mostrar comentarios más antiguos
hi every one
i have a number of points that i define as a X,Y and i have wrotten the under steps.
x = eldof(:,10); %%x=[0,0.5,240]
y = eldof(:,11);
plot(x, y, 'b.', 'MarkerSize', 5);
grid on;
% Make line
xRedLine =unique(x);
redLine = 60+10*exp((-(xRedLine-120).^2)/100);
hold on;
plot(xRedLine, redLine, 'r+-', 'LineWidth', 2, 'MarkerSize', 2);
%xlim([0 120]);
%ylim([0 60]);
% Find values less than the red line for each x and plot a red square around them
for k = 1 : length(x)
thisX = round(x(k))
index = find(thisX >= xRedLine);
if y(k) < redLine(index);
plot(thisX, y(k), 'rs', 'MarkerSize', 5);
end
end
now my answer is earned something like this
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/533314/image.jpeg)
and as you see the area that shown with circle its false. and that area should verified with red but ...
what can i do for that??
please help me
thanks
0 comentarios
Respuestas (0)
Ver también
Categorías
Más información sobre Creating and Concatenating Matrices 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!