Filter löschen
Filter löschen

understanding MATLAB method in long equation

1 Ansicht (letzte 30 Tage)
Abdullah Sultan
Abdullah Sultan am 15 Dez. 2021
Kommentiert: Abdullah Sultan am 16 Dez. 2021
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 )

Akzeptierte Antwort

Voss
Voss am 15 Dez. 2021
Bearbeitet: Voss am 15 Dez. 2021
The 1-sqrt(5) needs parentheses around it too.
  3 Kommentare
Voss
Voss am 15 Dez. 2021
Bearbeitet: Voss am 15 Dez. 2021
(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 am 16 Dez. 2021
thank you again , your explanation is very useful ,
best regards

Melden Sie sich an, um zu kommentieren.

Weitere Antworten (0)

Kategorien

Mehr zu Loops and Conditional Statements finden Sie in Help Center und File Exchange

Produkte


Version

R2021b

Community Treasure Hunt

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

Start Hunting!

Translated by