- #1

- 26

- 0

How to integrate

exp(x)*erfc(x) ? in MATLAB

The warning msg it is displaying is :

EXPLICIT integral could not be found

You are using an out of date browser. It may not display this or other websites correctly.

You should upgrade or use an alternative browser.

You should upgrade or use an alternative browser.

- Thread starter bhartish
- Start date

- #1

- 26

- 0

How to integrate

exp(x)*erfc(x) ? in MATLAB

The warning msg it is displaying is :

EXPLICIT integral could not be found

- #2

- 360

- 1

- #3

- 26

- 0

- #4

- 360

- 1

Seems like a function that can easily be numerically integrated over any range of x.

Does it actually produce a solution, but you don't trust it because of the warning message?

- #5

- 26

- 0

e^(a+bt) erfc(-c+rt)exp((t-q)/l)

within the limits o to t

within the limits o to t

- #6

MATLABdude

Science Advisor

- 1,657

- 5

- #7

- 26

- 0

I have all the values of a, b, c, r, q, l and t. Then how to go about it ?

- #8

MATLABdude

Science Advisor

- 1,657

- 5

Code:

```
t=0:pi/100:pi; % t values
y=sin(1*t); % calculation of function at all t
A = trapz(y,t); % implements trapezoid rule
```

Why did I explicitly use 1*t? While I could have just used t, it's to illustrate that there is no implicit multiplication in MATLAB (i.e. rt refers to the value / vector / matrix rt, while r*t refers to the product of r and t). I'd suggest writing up a small function (just as I've done above) in Notepad / Text Editor / EMacs / Vi, and then paste it here between the

- #9

- 26

- 0

I will get back to you sir.

- #10

- 26

- 0

I have one doubt cant we take some fictitous value and start integration of error function and exponential ?

- #11

MATLABdude

Science Advisor

- 1,657

- 5

I have one doubt cant we take some fictitous value and start integration of error function and exponential ?

It's your work--you can put in whatever you want!

Share: