what does it mean by [ ] in the following code

Respuestas (2)

ANKUR KUMAR
ANKUR KUMAR el 30 de Dic. de 2017
Editada: ANKUR KUMAR el 30 de Dic. de 2017

1 voto

It returns a column vector containing the smallest element in each row along third dimension.
Star Strider
Star Strider el 30 de Dic. de 2017
In the min function, the second argument is usually the second numerical scalar value to be compared. If you only have one argument, for example a matrix, and you want to find the minimum in a specific dimension of the matrix, leave the second argument ‘empty’ with the ‘empty array’ denoted by [], and then use a dimension argument.
In a function call, all arguments must appear in the correct order.
So here:
min(N,[],3)
the function takes the minimum of matrix ‘N’ along the third dimension, leaving the second argument ‘empty’.

La pregunta está cerrada.

Etiquetas

Preguntada:

el 30 de Dic. de 2017

Cerrada:

el 20 de Ag. de 2021

Community Treasure Hunt

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

Start Hunting!

Translated by