Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to find the Root of dichotomy equation by matlab

2025-04-05 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >

Share

Shulou(Shulou.com)06/01 Report--

This article mainly introduces matlab how to achieve the root of the dichotomy equation, the article is very detailed, has a certain reference value, interested friends must read it!

Hypothesis function

In the interval

It is continuous, and it can be solved by dichotomy at this time.

Solve the pseudo code:

A1 = a

B1 = b

Calculation midpoint

If, then the solution of the equation is terminated.

If

If

If

Repeat steps 2 through 4 above until the error is met and the iteration is stopped.

Convergent property

Is the result of the nth iteration, p is the real solution.

Give an example

The approximate solution of the equation on the interval [0BAE 2].

So the interval is scaled to [1pc2]

Using matlab, the calculation is as follows:

%-inputs-f = @ (x) 3x ^ x ^ 2-x Murray 3politics a = 0scape b = 2politics% tolerance / max iterTOL = 1eMurray 4; NI = 50 %--% STEP 1: initializationi = 1 fa = f (a); converge = false;% convergence flag% STEP 2: iterationwhile I

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Internet Technology

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report