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
Reply shazia.naureen (1) 5/13/2010 3:59:30 PM

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
Reply Walter 5/13/2010 8:39:35 PM


"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 
receive some help.

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


0
Reply Steven 5/13/2010 8:42:24 PM

2 Replies
458 Views

(page loaded in 0.039 seconds)

Similiar Articles:













7/19/2012 10:47:18 PM


Reply: