Info

La pregunta está cerrada. Vuélvala a abrir para editarla o responderla.

What is the function of the following if statement?

3 visualizaciones (últimos 30 días)
Rosie
Rosie el 3 de Feb. de 2017
Cerrada: MATLAB Answer Bot el 20 de Ag. de 2021
if (iscell(data_folder))
data_folder = data_folder{1};
end

Respuestas (1)

Walter Roberson
Walter Roberson el 3 de Feb. de 2017
In some flow of code it expects that data_folder might have become a cell array, and when it detects that, it extracts the first element of the array.
For example you might use that code if you want the user to be able to pass either a string or a cell array containing a string.

La pregunta está cerrada.

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by