Program sum in matlab

1 view (last 30 days)
Mohamed Musni
Mohamed Musni on 22 Jan 2018
Commented: Mohamed Musni on 22 Jan 2018
Any help for write this program will be great. Thank
you

Accepted Answer

Birdman
Birdman on 22 Jan 2018
Here is a starting point for you. Use symsum function from Symbolic Toolbox. See the example:
m=5;
P=sym('P',[1 m]);
t=sym('t',[1 m]);
q=sym('q',[1 m]);
syms k h
fun=sum(symsum((P+(t.*q/2).*h)./(t),k,1,m))
The rest is yours to do.
  3 Comments
Birdman
Birdman on 22 Jan 2018
You are welcome. If it is helpful, can you accept it?
Mohamed Musni
Mohamed Musni on 22 Jan 2018
sure. it helped me. again thank you for your valuable time :D

Sign in to comment.

More Answers (0)

Community Treasure Hunt

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

Start Hunting!