Vectorized Coding to Code a Function
Mostrar comentarios más antiguos
How do I create a function fseries1, which recieves the value of k and x, and calculates and returns the sum of the series.
S=1+3*x + 5*x^3 + 7*x^5+ 9*x^7 + ... + (2k+1)*x^(2k-1)
Write this function using vectorized coding, i.e. by using the array of coefficients [3 5 6 ...] and the array [ 1 3 5 ...] of powers of x/ Display the value of sum in the main script with 4 decimal places.
3 comentarios
Joseph DeMaria
el 14 de Nov. de 2020
Are Mjaavatten
el 15 de Nov. de 2020
Here are some hints, though:
Good luck!
Joseph DeMaria
el 15 de Nov. de 2020
Respuestas (0)
Categorías
Más información sobre Logical en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
