Manipulating character matrix into array in Matlab :

Status
Not open for further replies.

vickyuet

Member level 2
Joined
Oct 3, 2006
Messages
50
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,286
Location
pakistan
Activity points
1,691
Upon converting an input array into hex using Hex_LEN_INPUT = dec2hex(LEN_INPUT).My output appears as ...

out =
0e68
1b59
2927

>> whos out
Name Size Bytes Class Attributes
out 3x4 24 char

But I need my output to be as row vector like ...
out =[0e68 1b59 2927]
>> whos out
Name Size Class Attributes
out 1x18 char

I had achieved it using
for i=1:3
temp = Hex_LEN_INPUT(i,1:4)
a = [a ' ' temp]
end


But that does not fancy me at all....any better way to do it using built in function or better routine...Remember,each entries in out is hexadecimal representation of a decimal input number . :?:
Regards
 

Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…