How to do sequences and sums in matlab

2 views (last 30 days)
Hello,
I'm new to MATLAB and this may be a basic question but I'm very stuck.
The question on my University handout is:
'Use the power operator .^ in MATLAB to create the following sequences:
1. (1 4 9 16 25 36 49 64 81 100) 2. (1 i -1 -i) 3 (1 1/2 1/4 1/8 1/16) 4. In exercist 3, what will be the sum if the sequence is infinitely long?'
Could someone please help me in how to write the expression for any of these, I've been stuck for hours.
Thanks!

Accepted Answer

Sean de Wolski
Sean de Wolski on 3 Nov 2014
Here's the first one:
(1:10).^2
Now you do the second one!

More Answers (0)

Community Treasure Hunt

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

Start Hunting!