MatLAB Power Series Problem

  • #1
I having trouble trying to compute the sum of a finite power series with matlab.Basically, the problem says to take x=0.5 and compute the sum of a series for n=5, n=10, n=25, and n=100 and for all coefficients ai=1. It also says to use the operation .^ and command sum(v) that takes a vector and returns the sum of its elements. Then to do the same thing with x=1/4 and x=2/3. I guess my real problem is that I have very little matlab experience and don't even know where to start.
 

Answers and Replies

  • #2
berkeman
Mentor
59,651
9,792
I having trouble trying to compute the sum of a finite power series with matlab.Basically, the problem says to take x=0.5 and compute the sum of a series for n=5, n=10, n=25, and n=100 and for all coefficients ai=1. It also says to use the operation .^ and command sum(v) that takes a vector and returns the sum of its elements. Then to do the same thing with x=1/4 and x=2/3. I guess my real problem is that I have very little matlab experience and don't even know where to start.

Welcome to the PF.

You have to show some effort before we can offer much tutorial help -- them's the rules here at the PF.

So, how would you code this in C? Or in any other programming language that you know.

When you use the MATLAB Help feature, what does it show you for computing sums, and for raising numbers to powers?
 

Related Threads on MatLAB Power Series Problem

  • Last Post
Replies
0
Views
7K
  • Last Post
Replies
10
Views
1K
  • Last Post
Replies
1
Views
13K
  • Last Post
Replies
0
Views
2K
  • Last Post
Replies
1
Views
704
Replies
0
Views
4K
Replies
8
Views
1K
  • Last Post
Replies
1
Views
1K
  • Last Post
Replies
0
Views
2K
  • Last Post
Replies
5
Views
2K
Top