Info
이 질문은 마감되었습니다. 편집하거나 답변을 올리려면 질문을 다시 여십시오.
If I have many figures, how can I find a slope for each one and compare between thier slope?
조회 수: 2 (최근 30일)
이전 댓글 표시
I need to check which plot is steepest? I used polyfit to fit a curve and find a gradient but I do not know how to compare between figures slope.
댓글 수: 1
Thorsten
2015년 10월 19일
It is not clear what you want to achieve. Please provide an example in Matlab, showing what you have done so far and what you want to do.
답변 (2개)
Image Analyst
2015년 10월 19일
The gradient is the slope, so you have everything you need. For example if you fit a line
coefficients1 = polyfit(x1, y1, 1);
slope1 = coefficients1(1);
coefficients2 = polyfit(x2, y2, 1);
slope2 = coefficients2(1);
% Now compare
if slope1 > slope2
% Take some action.....
end
댓글 수: 0
이 질문은 마감되었습니다.
참고 항목
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!