|
Because the array elements are not of the same size, it would be good to use a cell array.
I don't know your outputs exactly, therefore I will give a close approximation here:
numberOfCodes = length(File_codes);
cellArray = cell(numberOfCodes,1);
for k = 1:numberOfCodes
cellArray{k} = [num2str(File_codes(k)) ' ' Co_codes(k)];
end
Something like this should work. [You will clearly need to modify the code according to your variables.]
"Laurence 12a440" <matt1234au@yahoo.com> wrote in message <gv7m59$i3h$1@fred.mathworks.com>...
> Hi
> ...snip
> fseek(fid, StartofField, 'bof');
> File_code=fread(fid, 1,'uint8');
> File_codes(count,1)=File_code;
> Filler = fread(fid, 7);
> Co_code = fread(fid, 14,'char');
> Co_code = char(Co_code)';
> Co_codes(count,2) = Co_code;
>
> count=count+1
> ...snip
>
> File_codes is coming out as a double (for example 123 1)
> Co_codes as a char (for example BHP ANZ )
>
> I need to make a final array that looks like
> 123 BHP
> 1 ANZ
>
> but I just can't get the two together, I know it will be something simple so can someone please help
>
> Thanks
|