Gistlib Logo

gistlib

other matlab categories

`looping` code snippets in matlab

for i in range(n): in matlab
write a script which will calculate the value of cos(x) (ask the user for the value of x and n) : ( ) ∑( ) = − − − = − + − = − n k k k k x x x x 1 2( 1) 1 2 4 2( 1)! in matlab

gistlibby LogSnag