Creat a new function using integral function
Mostra commenti meno recenti
Hi, I want to create a function using integral function in matlab. For example, I have a function F(t,u) and want integrate this F(t,u) function with respect to 't' only from (u, 100). Specifically, I want to have a function of 'u' by G(u)=integral(F(t,u), u, 100). How can I get this function?
Risposte (1)
John D'Errico
il 24 Feb 2015
Modificato: John D'Errico
il 24 Feb 2015
Assuming the limits on t are [u,100] as you stated...
G = @(u) integral(@(t) F(t,u),u,100);
You can evaluate G(u) at any point u. Note that G will NOT be vectorized, so as I've written it, G will accept only scalar inputs. You should be able to do that simply enough with a tool like arrayfun though.
Categorie
Scopri di più su Numerical Integration and Differentiation 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!