how to convert answer to one single number
조회 수: 5 (최근 30일)
이전 댓글 표시
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?
댓글 수: 0
채택된 답변
madhan ravi
2019년 9월 20일
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)
댓글 수: 1
추가 답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Symbolic Math Toolbox에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!