Converting double and integer value to logical array
Mostrar comentarios más antiguos
I have looked for a clue on converting to logical array but could not find. My code:
function w = funcmake(n,k)
sc = func1(k);%func1 calls one function
l = [];
j0 = 0;
i0 = 0;
for s0 = 1:n
[r, i0, j0, sc]=func2(i0, j0, sc);%func2 calls another function
l = [l r];
w = xor(n, l);%Here I need to convert them into logical array otherwise showing 0
end
I need to convert n and l to logical array first otherwise result shows 0. I have tried with
y = logical(x) but it does not work.
1 comentario
Matuno
el 9 de Dic. de 2013
Respuesta aceptada
Más respuestas (1)
Categorías
Más información sobre Logical en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!