numerical integration
이전 댓글 표시
I have code
c=0.2; t = 0.00001:0.0001:20; trapz(t,normcdf(((log(q(1)/K(1))+t*c^2/2)/(c*sqrt(t))),0,1)*stblpdf(t,0.5,1,12,0,'quick'));
but then I want to use vectors for 'q' and 'K' so I coded
c=0.2; t = 0.00001:0.0001:20; z = trapz(t,normcdf(((log(q./K)+t.*c.^2/2)./(c.*sqrt(t))),0,1).*stblpdf(t,0.5,1,12,0,'quick'));
but get the error
??? Error using ==> plus
Matrix dimensions must agree.
how can this be done?
채택된 답변
추가 답변 (0개)
카테고리
도움말 센터 및 File Exchange에서 Numerical Integration and Differentiation에 대해 자세히 알아보기
제품
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!