HI, is there any built in function in MATLAB to check, if all the elements in cell array or double array are same or not

6 visualizaciones (últimos 30 días)
Is there any built in function in MATLAB to check, if all the elements in cell array or double array are same or not, for example, if same then do some calculations else do something else
fck1 = {3,3,3,3,3}
% return 1 or 0 for uniqueness
if fck1% unique
%calculation
else
%calculations
end

Respuesta aceptada

Fangjun Jiang
Fangjun Jiang el 14 de Mayo de 2019
something like this
flag=numel(unique([fck1{:}]))==1

Más respuestas (0)

Categorías

Más información sobre Logical en Help Center y File Exchange.

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by