reading numbers from an unknown format

3 ビュー (過去 30 日間)
Karan
Karan 2012 年 4 月 15 日
in the cell given below , i want the column no 4 and 5 to be read as numbers so i can work on them further . i am unable to figure out the format given below . kindly help me out in getting the numbers reas from this format . (for column 4 and 5 only)
arrayl =
[ 1] '172.20.113.214' '85.17.72.66' [ 80] [51289]
[ 2] '85.17.72.66' '172.20.113.214' [51289] [ 80]
[ 3] '172.20.113.214' '38.124.168.125' [ 80] [51290]
[ 4] '38.124.168.125' '172.20.113.214' [51290] [ 80]
[ 5] '46.45.178.252' '172.20.113.214' [49234] [ 443]
[ 6] '46.45.178.252' '172.20.113.214' [49234] [ 443]
[ 7] '172.20.113.214' '46.45.178.252' [ 443] [49234]
[ 8] '46.45.178.252' '172.20.113.214' [49234] [ 443]
[ 9] '46.45.178.252' '172.20.113.214' [49234] [ 443]
[ 10] '172.20.113.214' '46.45.178.252' [ 443] [49234]

採用された回答

per isakson
per isakson 2012 年 4 月 15 日
Try
c4 = transpose( [ arrayl{:,4} ] );
c5 = transpose( [ arrayl{:,5} ] );
or are the data in a textfile?
  2 件のコメント
Karan
Karan 2012 年 4 月 15 日
worked ..thanks a lot ... i am still surprised at the function , transpose means something different!!!
Walter Roberson
Walter Roberson 2012 年 4 月 15 日
c4 = vertcat(array1{:,4});
would be equivalent to c4 = transpose( [ arrayl{:,4} ] );

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeShifting and Sorting Matrices についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by