October 29, 2010

matlab syms

>>syms x
>>syms y
>> y=diff(0.25*3^x*exp(-3.56*x*(1-x)))


y =
(3^x*exp((89*x*(x - 1))/25)*((178*x)/25 - 89/25))/4 + (3^x*exp((89*x*(x - 1))/25)*log(3))/4


>> solve('-(178*x)/25 + 89/25-log(3)=0','x')

ans = 1/2 - (25*log(3))/178


>> x=1/2 - (25*log(3))/178

x = 0.3457



***OR***

>> solve('y=0','y','x')

% if x has only one solution, the value can be seen from the "Workspace"
% However, if it has more than one solution, i still do not know how to look into % the construction of syms......

No comments:

Post a Comment

Days of our lives

Daisypath Anniversary tickers