Hi everyone I have a problem. I try to calculate the area between a linear function (red) and a polyline (blue). I hope someone can help me.

 채택된 답변

Jan
Jan 2018년 4월 26일

0 개 추천

How are the values of the lines stored? In two vectors containing Y values to the the same X coordinates? If so:
match = (y_blue <= y_red);
Area = cumtrapz(y_red(match) - y_blue(match))

댓글 수: 1

An Ku
An Ku 2018년 4월 27일
Thank very much. :) May you have an idea how I can visualize this area in a plot?

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

도움말 센터File Exchange에서 MATLAB에 대해 자세히 알아보기

질문:

2018년 4월 26일

댓글:

2018년 4월 27일

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by