How to add a column of string in a table in MATLAB?

11 ビュー (過去 30 日間)
Behrooz Daneshian
Behrooz Daneshian 2023 年 1 月 13 日
コメント済み: Cris LaPierre 2023 年 1 月 13 日
Hi all,
I have a table called "TEMP2". I want to add a column(TAVG) in which I have string saying that ''no data''. What is the esaiest way to do that?

回答 (1 件)

Behrooz Daneshian
Behrooz Daneshian 2023 年 1 月 13 日
移動済み: Cris LaPierre 2023 年 1 月 13 日
TEMP2.TAVG(:,1)="nodata";
I think that works.
  1 件のコメント
Cris LaPierre
Cris LaPierre 2023 年 1 月 13 日
Correct
load TEMP2
TEMP2.TAVG(:)="nodata"
TEMP2 = 6×3 table
date TMAX TAVG _______________________ ____ ________ {'2006-02-28T00:00:00'} 84 "nodata" {'2006-03-01T00:00:00'} 80 "nodata" {'2006-03-08T00:00:00'} 79 "nodata" {'2006-03-09T00:00:00'} 79 "nodata" {'2006-03-16T00:00:00'} 76 "nodata" {'2006-03-21T00:00:00'} 70 "nodata"

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

カテゴリ

Help Center および File ExchangeCharacters and Strings についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by