COMPGROUPS.NET | Search | Post Question | Groups | Stream | About | Register

### how to code this equation in matlab

• Follow

```Can some one help me the right way of coding the following equation into MATLAB. I am having problems in coding this equation.

y = [y0 + A* exp -(x.(x-xc)^2/2w^2)]. (1-exp-(b*x))
```
 0

```lene wrote:
> Can some one help me the right way of coding the following equation into MATLAB. I am having problems in coding this equation.

> y = [y0 + A* exp -(x.(x-xc)^2/2w^2)]. (1-exp-(b*x))

y = (y0 + A .* exp(-(x .* (x-xc) .^ 2 / (2 * w .^ 2))) .* (1-exp(-b .* x))
```
 0

```"lene" <shazia.naureen@gmail.com> wrote in message
news:907898463.131520.1273780800933.JavaMail.root@gallium.mathforum.org...
> Can some one help me the right way of coding the following equation into
> MATLAB. I am having problems in coding this equation.
>
> y = [y0 + A* exp -(x.(x-xc)^2/2w^2)]. (1-exp-(b*x))

Certainly.  Show us how you coded it and explain specifically what problems
you're having (what error or warning do you receive, or what values do you
receive that are different than the values you expect) and you should

--
Steve Lord
slord@mathworks.com
comp.soft-sys.matlab (CSSM) FAQ: http://matlabwiki.mathworks.com/MATLAB_FAQ

```
 0

2 Replies
458 Views

Similiar Articles:

7/19/2012 10:47:18 PM