How can I round numbers from a column?

6 ビュー (過去 30 日間)
Cristian Martin
Cristian Martin 2020 年 6 月 14 日
コメント済み: Cristian Martin 2020 年 6 月 14 日
Hi,
I have:
load('work.mat');
C = T(:,2);%read second column
C{:, 1} = regexprep(C{:, 1}, '[(ms)]', '');%eliminate text after numbers
X = round(C)
How do I round the numbers after I delete the text ?
____________________________________________________
Undefined function 'round' for input arguments of type 'table'.
Error in Runscript (line 8)
X = round(C)

採用された回答

madhan ravi
madhan ravi 2020 年 6 月 14 日
編集済み: madhan ravi 2020 年 6 月 14 日
round(C{:,1})
  10 件のコメント
madhan ravi
madhan ravi 2020 年 6 月 14 日
doc str2double
Cristian Martin
Cristian Martin 2020 年 6 月 14 日
Thank You Ravi !

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

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeEnvironment and Settings についてさらに検索

タグ

製品


リリース

R2016a

Community Treasure Hunt

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

Start Hunting!

Translated by