How to combine data from two columns into a single column?

2 ビュー (過去 30 日間)
Marissa Holden
Marissa Holden 2017 年 9 月 8 日
コメント済み: Marissa Holden 2017 年 9 月 8 日
I have a variable called "time" = which contains the time of something but it's in 2 columns i.e time=[15,31] (this is hours and minutes, so the time is 3:31). I want to create a variable that compresses this, so time would be 15.31 in a single column, how would I do this?

採用された回答

KSSV
KSSV 2017 年 9 月 8 日
time = [10 1; 14 3 ; 15 6] ;
str = repmat('.',size(time,1),1) ;
iwant = str2num([num2str(time(:,1)),str, num2str(time(:,2))])

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeLogical についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by