f



Prob getting '1's and '0's

Hi all =)

I have a var named Data_Bin which is in <10614*8char> 
containing binary '1's and '0's. eg 

Data_Bin =

11111111
11111111
11111111
11111111
.... ...


I tried 2 methods,

Method 1:

aa = [];
for i=1:84912
aa = [aa, Data_Bin(i)];
end

Result: It gave me a 1*1 matrix but if I transpose the 
result, it'll give me a col vector.

Method 2:

aa = [];
for i=1:84912
aa (1, i) = Data_Bin(i);
end

Result: It gave me a row vector of [49 49 49 49 ...]


How do I get a row vector, 1*84912, from Data_Bin??
Thank you.
0
yingmusg (11)
4/9/2008 2:13:01 AM
comp.soft-sys.matlab 211266 articles. 18 followers. lunamoonmoon (258) is leader. Post Follow

1 Replies
473 Views

Similar Articles

[PageSpeed] 35

"yingmu huadao":
<SNIP all in one row...

> How do I get a row vector, 1*84912, from Data_Bin...

one of the solutions

     dbrow=Data_Bin(:).';

us
0
us1 (8052)
4/9/2008 5:56:02 AM
Reply: