If there is a coding "sqrt(sum(​data(:,1:e​nd).^2,2))​" , so what is the function number 2 after comma?

Hello everyone, i wanna ask, what is the function of number 2 after comma in coding "sqrt(sum(data(:,1:end).^2,2))"?
Thank you.

2 comentarios

sum along the 2nd dimension
You can also take a look at the reference document

Iniciar sesión para comentar.

 Respuesta aceptada

That tells the sum() function to sum along the rows.
See the documentation for sum here

2 comentarios

You are welcome. Please accept the answer if it helped you. Thanks.

Iniciar sesión para comentar.

Más respuestas (0)

Categorías

Más información sobre Programming en Centro de ayuda y File Exchange.

Productos

Versión

R2020a

Etiquetas

Preguntada:

el 4 de Ag. de 2022

Comentada:

el 4 de Ag. de 2022

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by