1. ## Matlab Help sequence

Write a sequence of commands that compute and display the sum of the numbers from 1 to 20, each raised to the fifth power.

2. Originally Posted by Mathhelpz
Write a sequence of commands that compute and display the sum of the numbers from 1 to 20, each raised to the fifth power.
So what have you done?

CB

3. im thinking

for i = 1:20
x = 5
y = i^x
end

4. Originally Posted by Mathhelpz
im thinking

for i = 1:20
x = 5
y = i^x
end
Have you tried running that code?

CB

5. clear
clc
x = 5;
for i = 1:20
y = i^x
end

I tested it and seems like all numbers all raised to the fifth power from 1 to 20. How do I display the sum of all of it???

6. Originally Posted by Mathhelpz
clear
clc
x = 5;
for i = 1:20
y = i^x
end

I tested it and seems like all numbers all raised to the fifth power from 1 to 20. How do I display the sum of all of it???
sum([1:20].^5)

CB