Asked by Dan
on 30 Nov 2012

Here is my code guys. Kind of stumped been at it for a while.

syms Cb kT k x a v t;

forcingFxn = (.5*k/kT*(v*t-x)); Uleft = (Cb/kT)*(2*x^2/a^2 -2/3)+ forcingFxn; Uright = (-Cb/kT)*(x/a-1)^2+forcingFxn;

product = Uleft*Uright;

dUl = diff(Uleft); dUr = diff(Uright);

%%Integral of this product integral = int(product,t);

finalExpressionForRt = exp(-integral); substituted = subs(finalExpressionForRt,{t,x,Cb,k,kT,a,v},{1,0,40,2,4,1,1}); disp(substituted);

---------------------

Displays this when run...

1/exp((8*Cb^2 - 5*Cb*k*v + k^2*v^2)/(12*kT^2))

Why are t,x,a being substituted while Cb,Kt,k and v are not???

Thanks for the help,

Dan

*No products are associated with this question.*

Opportunities for recent engineering grads.

## 1 Comment

## bym (view profile)

Direct link to this comment:http://www.mathworks.com/matlabcentral/answers/55236#comment_114479

what are you expecting to be the result for 'substituted' ?

using your code I get