MATLAB Answers

How to solve an equation using numerical solver in Matlab?

3 views (last 30 days)
aa on 30 Sep 2020
Commented: aa on 30 Sep 2020
Hi everyone,
I want to solve this equation using numerical solver. I have value of R and want to calculate the coressponding value of n using numerical solver.
May someone help me here ......
R =1/n^2 [(n+1)ln(n+1)-n]


Sign in to comment.

Accepted Answer

Alan Stevens
Alan Stevens on 30 Sep 2020
Look up documentation on fzero.


Show 8 older comments
aa on 30 Sep 2020
May you help me in generalizing this programme for large number of values. For example, I have more tahn 500 values of R and I want to calculate n for each values of R ....
John D'Errico
John D'Errico on 30 Sep 2020
But what is wrong with writing a loop? Just wrap that code inside a loop, where you change R each time through.
aa on 30 Sep 2020
Earlier my code did not work with the loop but now I have fixed the error... it works perfectly .. Thanks

Sign in to comment.

More Answers (0)

Community Treasure Hunt

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

Start Hunting!