How can I integrate something times a function file?
이전 댓글 표시
I'm trying to integrate a function that is a derivative squared and multiplied by a constant. The derivative I have saved as a separate function file. I've tried to use a.*(@funct).^2 as the integrand but I'd get errors. I also tried to call that integrand a separate function and call that function, tried fhandle=@funct, but none worked. Can I not use @funct that way and if not, how should I use it?
채택된 답변
추가 답변 (1개)
Iain
2014년 9월 30일
This example uses "sin", instead of whatever function you're using to get your integrand.
to_be_integrated = @(x)(sin(x).^2*5+2);
카테고리
도움말 센터 및 File Exchange에서 Loops and Conditional Statements에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!