필터 지우기
필터 지우기

understanding MATLAB method in long equation

조회 수: 1 (최근 30일)
Abdullah Sultan
Abdullah Sultan 2021년 12월 15일
댓글: Abdullah Sultan 2021년 12월 16일
this the orginal equation
and this is the equation code
fn= 1/sqrt(5) * ( ( (1+sqrt(5)) / 2 )^n - (1-sqrt(5)/2).^n )
just to understand matlab proccess, why in the first (1+sqrt(5)) part we should put () more than the second part (1-sqrt(5)/2) even though they are the same side
to be more clear I make the () bold to mention why here we should make more () the other side
fn= 1/sqrt(5) * ( ( (1+sqrt(5)) / 2 )^n - (1-sqrt(5)/2).^n )

채택된 답변

Voss
Voss 2021년 12월 15일
편집: Voss 2021년 12월 15일
The 1-sqrt(5) needs parentheses around it too.
  댓글 수: 3
Voss
Voss 2021년 12월 15일
편집: Voss 2021년 12월 15일
(1+sqrt(5)) / 2 means: add 1 to the square root of 5 and divide the result by 2.
1+sqrt(5) / 2 means: divide the square root of 5 by 2 and add one to the result.
The parentheses are necessary to treat the whole expression 1+sqrt(5) as the numerator of a fraction in the equation.
Abdullah Sultan
Abdullah Sultan 2021년 12월 16일
thank you again , your explanation is very useful ,
best regards

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Loops and Conditional Statements에 대해 자세히 알아보기

제품


릴리스

R2021b

Community Treasure Hunt

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

Start Hunting!

Translated by