Combining two binary words?

If i have a=011 and b=100
how will i write y=[011100] in the combined form in matlab.
Please help me.

1 Kommentar

Jan
Jan am 7 Aug. 2013
Bearbeitet: Jan am 7 Aug. 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.

Melden Sie sich an, um zu kommentieren.

 Akzeptierte Antwort

Azzi Abdelmalek
Azzi Abdelmalek am 7 Aug. 2013

1 Stimme

y=[a b]

2 Kommentare

Pooja
Pooja am 7 Aug. 2013
y=[a b] gives the o/p as 011 100 only i need to get as 011100. Does the two mean the same?
a='011'
b='100'
y=[a b]
%y=011100

Melden Sie sich an, um zu kommentieren.

Weitere Antworten (0)

Kategorien

Mehr zu Entering Commands finden Sie in Hilfe-Center und File Exchange

Tags

Community Treasure Hunt

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

Start Hunting!

Translated by