how to evaluate integral for given input function ?
이전 댓글 표시
Hi guys, Please check the picture below.
A = [a1 a2 a3 ....] A is given, they are temperature number array. You can assume any value you want.
u = [1 2 3 4 ...] u is the time, like hours
So, this temperature functino x(u), will be feed into function out (t, x(t)) to do the intergation. This output of "out" will be only between [0 1] for any given time, t. t is just like u, >=0.
채택된 답변
추가 답변 (1개)
Steven Lord
2021년 8월 24일
0 개 추천
You don't have a function, you have a vector of data. Unless you know the form of the function x(u) from the theory underlying your original problem consider trapz or cumtrapz to integrate the data directly.
댓글 수: 3
sun
2021년 8월 24일
Based on the other question to which you linked, what you want to integrate is essentially a stairs plot?
x = 0:0.5:5;
y = x(randperm(numel(x)));
stairs(x, y)
sun
2021년 8월 25일
카테고리
도움말 센터 및 File Exchange에서 Spline Postprocessing에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!


