repeated_addition - Inputs number to be added repeatedly...

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
Sheet1 Page 1 function sum = repeated_addition(number) % Function repeated_addition % Calculate the result of adding the same number 100,000 times. % % Usage: sum = repeated_addition(number)
Background image of page 1
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: % % Inputs: number to be added repeatedly % % Outputs: sum = total sum over 100,000 iterations sum = 0 for i = 1:100000 sum = sum + number end...
View Full Document

{[ snackBarMessage ]}

Ask a homework question - tutors are online