Function computes exact or approximate solutions to partial sums of real non-negative powers via power series.
Ahora está siguiendo esta publicación
- Verá actualizaciones en las notificaciones de contenido en seguimiento.
- Podrá recibir correos electrónicos, en función de las preferencias de comunicación que haya establecido.
The sequence S_k(n) = 1^k + 2^k + 3^k ... + n^k is computed via power series by the function call
Skn = partial_sum(k,n,R)
with input constraints:
real, non-negative k
real n>=1
integer R between 1-20 specifies approximation depth
Output is necessarily an approximation for non-integer k. Output is exact for integer k, assuming R>=k+1.
Example: approximate 1^(pi/4) + 2^(pi/4) + 3^(pi/4) ... + 27^(pi/4) using a depth of 3.
Skn = Skn(pi/4,27,3)
Answer: Skn = 207.8504...
Citar como
Ryan Black (2026). Partial sums of powers (https://la.mathworks.com/matlabcentral/fileexchange/75122-partial-sums-of-powers), MATLAB Central File Exchange. Recuperado .
Información general
- Versión 1.0.1 (1,12 KB)
Compatibilidad con la versión de MATLAB
- Compatible con cualquier versión
Compatibilidad con las plataformas
- Windows
- macOS
- Linux