How do i script to calculate the Sum for the following expression
1 view (last 30 days)
Show older comments
I need help for this question. I'm a matlab beginner so i have no idea how to do this.
0 Comments
Answers (1)
KSSV
on 9 Dec 2020
You can also achieve the same without suing loop. This is called vectorization. You should read about element by element divison and element by element multiplication.
n = 100 ;
i = 1:n;
f = 1./i+1./((i+2).*(i+3)) ;
thesum = sum(f) ;
0 Comments
See Also
Categories
Find more on Introduction to Installation and Licensing 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!