writing long equation with correct answer
1 view (last 30 days)
Show older comments
Abdullah Sultan
on 13 Dec 2021
Commented: Abdullah Sultan
on 14 Dec 2021
Hello everyone, this is not hw ;) I'm self-learner. I'ev faced this equation but couldn't get the final answer correctly. the final answer is 55, but I have different answers. I will attach the equation and my trails. Apology for my low level in english :'(
my trails:
n=10;
fn= [(1/sqrt(5))].* [(1+sqrt(5)/(2)).^n - (1-sqrt(5)/(2).^n)]
and this one
fn= 1/sqrt(5).* (1+sqrt(5)/(2).^n - (1-sqrt(5)/(2).^n))
0 Comments
Accepted Answer
Chunru
on 13 Dec 2021
Note that in matlab "( )" are very different from "[ ]":
n=10;
fn= 1/sqrt(5) * ( ( (1+sqrt(5)) / 2 )^n - (1-sqrt(5)/2).^n )
4 Comments
More Answers (1)
Walter Roberson
on 13 Dec 2021
fn= [(1/sqrt(5))].* [(1+sqrt(5)/(2)).^n - (1-sqrt(5)/(2).^n)]
Notice that in the first sub-expression it is the 1+ expression that is being raised to n, but in the second sub-expression, it is only the 2 that is being raised to the n.
See Also
Categories
Find more on Scope Variables and Generate Names in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!