Integral calculation using matlab
Mostrar comentarios más antiguos
Hello i wish to calculate the following integral

My difficulty stems from the absolute value which is "outside" of the integral with respect to θ
Respuesta aceptada
Más respuestas (1)
My difficulty stems from the absolute value which is "outside" of the integral
Why is this a difficulty? Because it prevents you from using integral2()? Just apply integral() twice instead.
5 comentarios
MINAS KOUROUMPLAKIS
el 4 de Ag. de 2020
MINAS KOUROUMPLAKIS
el 4 de Ag. de 2020
Matt J
el 4 de Ag. de 2020
Use integral() to evaluate the inner integral (over theta). Then take the absolute value squared of that. Then apply integral() again to integrate the result fo the previous step over phi.
MINAS KOUROUMPLAKIS
el 4 de Ag. de 2020
Steven Lord
el 4 de Ag. de 2020
Write a function to compute the inner integral. This function should accept phi. One wrinkle here is that since the outer integral call is going to pass a vector of values into it as phi, your inner integral call will need to say that the function is ArrayValued.
Write a function that takes the absolute value of that inner integral function.
Write a function to compute the outer integral of the absolute value function.
If you try this and it doesn't work, show us the code you wrote and we may be able to offer some guidance.
Categorías
Más información sobre MATLAB en Centro de ayuda y File Exchange.
Productos
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!