integrate
cfit
객체 적분
설명
예제
integrate
함수를 사용하여 피팅의 적분 구하기
기준 정현파 신호를 만듭니다.
xdata = (0:.1:2*pi)'; y0 = sin(xdata);
신호에 응답 종속적인 가우스 잡음을 추가합니다.
noise = 2*y0.*randn(size(y0)); ydata = y0 + noise;
잡음이 있는 데이터를 사용자 지정 정현파 모델로 피팅합니다.
f = fittype('a*sin(b*x)'); fit1 = fit(xdata,ydata,f,'StartPoint',[1 1]);
예측 변수에서 피팅의 적분을 구합니다.
int = integrate(fit1,xdata,0);
데이터, 피팅 및 적분을 플로팅합니다.
subplot(2,1,1) plot(fit1,xdata,ydata) % cfit plot method subplot(2,1,2) plot(xdata,int,'m') % double plot method grid on legend('integral')
cfit
plot
메서드를 사용하여 적분을 계산하고 직접 플로팅할 수도 있습니다.
figure plot(fit1,xdata,ydata,{'fit','integral'})
그러나 plot
메서드는 적분에 대한 데이터를 반환하지 않습니다.
입력 인수
fun
— cfit
함수
cfit
적분할 함수로, cfit
객체로 지정됩니다.
x
— 적분 점
벡터
함수를 적분할 위치가 되는 점으로, 벡터로 지정됩니다.
x0
— 적분의 첫 번째 점
스칼라
적분의 첫 번째 점으로, 스칼라로 지정됩니다.
출력 인수
int
— 적분 결과
벡터
적분 결과로, x와 동일한 크기의 벡터로 반환됩니다.
버전 내역
R2006a 이전에 개발됨
MATLAB 명령
다음 MATLAB 명령에 해당하는 링크를 클릭했습니다.
명령을 실행하려면 MATLAB 명령 창에 입력하십시오. 웹 브라우저는 MATLAB 명령을 지원하지 않습니다.
Select a Web Site
Choose a web site to get translated content where available and see local events and offers. Based on your location, we recommend that you select: .
You can also select a web site from the following list:
How to Get Best Site Performance
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.
Americas
- América Latina (Español)
- Canada (English)
- United States (English)
Europe
- Belgium (English)
- Denmark (English)
- Deutschland (Deutsch)
- España (Español)
- Finland (English)
- France (Français)
- Ireland (English)
- Italia (Italiano)
- Luxembourg (English)
- Netherlands (English)
- Norway (English)
- Österreich (Deutsch)
- Portugal (English)
- Sweden (English)
- Switzerland
- United Kingdom (English)