output representation

11 Ansichten (letzte 30 Tage)
Catherine
Catherine am 8 Jun. 2011
in the command window, we got 2 outputs as: w= 0 0 1 0 1 1 1 0 0 0 1 1
and
y= 2.04 0.19 5.26 4.80
i need these two outputs side by side in the command window in two columns that is, one column containg 'w' values and another column containing 'y' values side by side so that i can compare them.
please help!

Akzeptierte Antwort

Paulo Silva
Paulo Silva am 8 Jun. 2011
w= [0 0 1 0 1 1 1 0 0 0 1 1]
y= [2.04 0.19 5.26 4.80]
z=[w' [y nan(1,numel(w)-numel(y))]']
%if w and y got the same number of elements z=[w' y']
%the nan I used was just to fill the missing elements on the vector

Weitere Antworten (0)

Community Treasure Hunt

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

Start Hunting!

Translated by