Plot of a numerical integration

11 visualizaciones (últimos 30 días)
P Rakesh Kumar Dora
P Rakesh Kumar Dora el 23 de Oct. de 2020
Comentada: Star Strider el 23 de Oct. de 2020
Please someone can help how to plot the following numerical
integration with respect to "z". Here "z" varies from "0" to "1". The
integral need to be done by numerical integration method.

Respuesta aceptada

Star Strider
Star Strider el 23 de Oct. de 2020
Try this:
zv = linspace(0, 1);
for k = 1:numel(zv)
z = zv(k);
u_int(k) = integral(@(u) sqrt(u)/((exp(u)/z)-1) + z/(1-z), 0, Inf, 'ArrayValued',1);
end
figure
semilogy(zv, u_int)
grid
xlabel('z')
ylabel('Integrated Value')
.
  6 comentarios
P Rakesh Kumar Dora
P Rakesh Kumar Dora el 23 de Oct. de 2020
Please can you tell how to locate precise value of the integrand corresponding
to precise value of "z" in the plot?
Star Strider
Star Strider el 23 de Oct. de 2020
The ‘z’ values are the elements of the ‘zv’ vector. They correspond to the elements of ‘u_int’. So ‘z=0’ corresponds to ‘u_int(1)’, ‘z=1’ to ‘u_int(end)’, with end depending on how many elements of ‘u_int’ you choose to calculate.

Iniciar sesión para comentar.

Más respuestas (0)

Categorías

Más información sobre Programming en Help Center y File Exchange.

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by