How to integrate a symbolic function on a discrete interval? (a b,b c, c d...)
Mostra commenti meno recenti
I want to create a 2x2 array E where entries are definite integrals of a discontinuous function multiplied by some function (inside the integral) f=[f1 f2].
My discontinuous function, say A (always a constant function) is
A=18 from 0 to 1
A=16 from 1 to 2
A=14 from 2 to 3
I want my array entries to be:
E(1,1)= sum(int((A(1)*f(1))*f(1),0,1)+int((A(2)*f(1)(1)),1,2)+int((A(3)*f(1)*f(1)),2,3))
E(1,2)=sum(int((A(1)*f(1)*f(2)),0,1)+int((A(2)*f(1)*f(2)),1,2)+int((A(3)*f(1)*f(2)),2,3))
E(2,1)=sum(int((A(1)*f(2)*f(1)),0,1)+int((A(2)*f(2)*f(1)),1,2)+int((A(3)*f(2)*f(1)),2,3))
Hope you get the idea in E(1,1) f multiplier inside the integral is f(1)*f(1) in E(1,2) f(1)*f(2) in E(2,1) f(2)*f(1) and so on. This can be done with say a for loop inside the integral but how do I discretize the limits into 0 1, 1 2, 2,3 for a symbolic integral?
Is there a way to do such thing or for a 2x2 array I shouldn't even bother? Thanks
Risposte (0)
Categorie
Scopri di più su Calculus in Centro assistenza e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!