Row & Column Operations in table

3 ビュー (過去 30 日間)
Aakash Iyer
Aakash Iyer 2019 年 4 月 12 日
編集済み: per isakson 2019 年 4 月 18 日
Hi,
I have a 83x8 table and I wish to add 1 to each element in the table.
Initial:
SPY GOVT EEMV CME BR CBOE ACN ICE
0.034 0.000 0.038 0.179 -0.009 0.077 0.019 0.203
0.027 -0.008 -0.005 0.042 -0.011 0.019 0.081 -0.017
Final:
SPY GOVT EEMV CME BR CBOE ACN ICE
1.034 1.000 1.038 1.179 0.991 1.077 1.019 1.203
1.027 0.992 0.995 1.042 0.989 1.019 1.081 0.983

採用された回答

madhan ravi
madhan ravi 2019 年 4 月 12 日
varfun(@(x)x+1,T) % where T is your table
  1 件のコメント
Aakash Iyer
Aakash Iyer 2019 年 4 月 12 日
Thank you!

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

その他の回答 (1 件)

Peter Perkins
Peter Perkins 2019 年 4 月 16 日
If the table is entirely numeric, t{:,:} = t{:,:} + 1 would also work, and may be more readable. But varfun will be more efficient for large tables. 83x8 is not large.

カテゴリ

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

Community Treasure Hunt

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

Start Hunting!

Translated by