how to solve iterative equations ?

Hi,
Please guys help me out. I have a problem in solving the iterative equation. i have an equation say 2u-3+ln(u-0.5)+2x=0. For every iteration, say upto 30 iterations, 'x' changes as 0:dx:1, hence for every change of x, i need to find 'u' and store it. I have tried using fzero,inline,solve but could not get the vector 'u'. Can anyone please help me out in writing this code

1 件のコメント

Matt J
Matt J 2013 年 3 月 2 日
FZERO should have worked. You should show your coding attempt so we can see what might have gone wrong.

サインインしてコメントする。

回答 (1 件)

Youssef  Khmou
Youssef Khmou 2013 年 3 月 3 日

1 投票

hi, you can solve your equation by many ways , try :
a=solve('2*u-3*log(u-0.5)+2*x','u')
u=subs(a,linspace(0,1,30));
plot(u) % this is the solution
Now you can verify your solution U :
X=linspace(0,1,30);
ZZ=2*u-3*log(u-0.5)+2*X;

1 件のコメント

José-Luis
José-Luis 2013 年 3 月 3 日
Please don't post answers to what seem to be homework questions.

サインインしてコメントする。

カテゴリ

ヘルプ センター および File ExchangeSystems of Nonlinear Equations についてさらに検索

質問済み:

2013 年 3 月 2 日

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by