필터 지우기
필터 지우기

How to find the definite integral?

조회 수: 2 (최근 30일)
Jiyeon Jang
Jiyeon Jang 2021년 5월 22일
댓글: Nagasai Bharat 2021년 5월 24일
Here is the code I have..
X = zeros(1,length(data));
Y = zeros(1,length(data));
for i = 1:101
temp = strsplit(data{i},',');
X(i) = str2double(temp{3}); Y(i) = str2double(temp{4});
end
for i = 102:length(data)
temp = strsplit(data{i},',');
X(i) = str2double(temp{2}); Y(i) = str2double(temp{3});
end
In this code the length(data) is 10, and What should I do if I want to find the absolute value of Y(i) from 0 to 1200?
like this.
  댓글 수: 2
Torsten
Torsten 2021년 5월 22일
1/X(end)*trapz(X,abs(Y))
Why do you repeat your question ? It was already answered in another thread.
Nagasai Bharat
Nagasai Bharat 2021년 5월 24일
Hi,
The following documentation would help you in finding the the definite intergral value you need.
As already suggested, many answered questions related to yours can be found in the community.

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

답변 (0개)

카테고리

Help CenterFile Exchange에서 Numerical Integration and Differentiation에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by