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

Printable View

- Mar 14th 2010, 08:23 AMMathhelpzMatlab 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.

- Mar 14th 2010, 12:36 PMCaptainBlack
- Mar 14th 2010, 04:19 PMMathhelpz
im thinking

for i = 1:20

x = 5

y = i^x

end - Mar 14th 2010, 08:56 PMCaptainBlack
- Mar 15th 2010, 06:21 AMMathhelpz
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??? - Mar 15th 2010, 08:34 AMCaptainBlack