Engineering Homework Help

San Diego State University While Loop and For Loops Matlab Task

 

  1. Use a while loop to calculate factorial(10):

f=10×9×8×7×6×5×4×3×2×1

2. The following series can be written with a shorthand form of sigma notation (A). Use while syntax to calculate this arithmetic series:

1/1×2+1/2×3+1/3×4+...+1/n×(n+1)

A=1/n×(n+1); n=[1:10000]