フィルターのクリア

how do i write a scrip for finding the loop of sin figures

2 ビュー (過去 30 日間)
James Water Bird
James Water Bird 2022 年 6 月 7 日
編集済み: James Water Bird 2022 年 6 月 7 日
using this equation
  2 件のコメント
KSSV
KSSV 2022 年 6 月 7 日
How that equation to be used? What have you attempted?
Dyuman Joshi
Dyuman Joshi 2022 年 6 月 7 日
If you need help starting, refer to - Babylonian Method of computing Square Root

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

回答 (1 件)

Abhijit Nayak
Abhijit Nayak 2022 年 6 月 7 日
This is a method of finding square-root of a number using Babylonian Method.
The following code is for your required significant figures which you can change according to your need.
x=15;
xn=x./2;
err=abs(xn-x./xn);
while any(err>1e-4)
xn=0.5.*(xn+x./xn);
err=abs(xn-x./xn);
end
y=xn;
fprintf("the ans is %.4f",y);

カテゴリ

Help Center および File ExchangeResizing and Reshaping Matrices についてさらに検索

製品

Community Treasure Hunt

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

Start Hunting!

Translated by