Combining two binary words?

4 visualizaciones (últimos 30 días)
Pooja
Pooja el 7 de Ag. de 2013
If i have a=011 and b=100
how will i write y=[011100] in the combined form in matlab.
Please help me.
  1 comentario
Jan
Jan el 7 de Ag. de 2013
Editada: Jan el 7 de Ag. de 2013
What does "a = 011" exactly mean? Leading zeros are not meaningful for numbers, so perhaps you mean strings:
a = '011'
or vectors:
a = [0, 1, 1]
Please explain this. But in both cases Azzi's suggested [a,b] would be correct.

Iniciar sesión para comentar.

Respuesta aceptada

Azzi Abdelmalek
Azzi Abdelmalek el 7 de Ag. de 2013
y=[a b]
  2 comentarios
Pooja
Pooja el 7 de Ag. de 2013
y=[a b] gives the o/p as 011 100 only i need to get as 011100. Does the two mean the same?
Azzi Abdelmalek
Azzi Abdelmalek el 7 de Ag. de 2013
a='011'
b='100'
y=[a b]
%y=011100

Iniciar sesión para comentar.

Más respuestas (0)

Categorías

Más información sobre Numeric Types 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