how to convert answer to one single number

9 visualizaciones (últimos 30 días)
Faezeh Manesh
Faezeh Manesh el 20 de Sept. de 2019
Comentada: madhan ravi el 20 de Sept. de 2019
Hello Everybody,
I am trying to integrate a function as follows:\
clc
clear all
syms x
f = 2.048*exp(-((x-5.056)/0.2349)^2) + 1.089*exp(-((x-4.887)/0.4006)^2) + 0.4116*exp(-((x-9.103)/5.731)^2);
b=int(f,0,8.475167785)
I need a value for this integral but MATLAb gives me the following expression wich is useless for me:
b =
(5897199*pi^(1/2)*(erf(9103/5731) - erf(22089882261915571/201641636441096192)))/5000000 + (2181267*pi^(1/2)*(erf(24435/2003) + erf(631237152323000705/70474297293930496)))/10000000 + (18792*pi^(1/2)*(erf(50560/2349) + erf(601506357907937665/41324045018333184)))/78125
>> Do you know how I can convert this expression to a single value easily?

Respuesta aceptada

madhan ravi
madhan ravi el 20 de Sept. de 2019
f = @(x) 2.048*exp(-((x-5.056)/0.2349).^2) +...
1.089*exp(-((x-4.887)/0.4006).^2) +...
0.4116*exp(-((x-9.103)/5.731).^2);
b = integral(f,0,8.475167785)

Más respuestas (0)

Categorías

Más información sobre Symbolic Math Toolbox 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