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 次查看(过去 30 天)
显示 更早的评论
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 个评论
回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Creating and Concatenating Matrices 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!