Using corresponding values in a table in an equations

I have a table with four fields (name,population,value1,value2). I want to compute value3 for each name. The equation is as follows value3=(value1./100).*population. How do I get it to use the corresponding values of each name? Thanks.

回答 (1 件)

Peter Perkins
Peter Perkins 2017 年 11 月 29 日

0 投票

If your table is named "t", then
t.value3 = (t.value1./100).*t.population
creates a new variable in t named "value3".

カテゴリ

ヘルプ センター および File ExchangeData Types についてさらに検索

質問済み:

2017 年 11 月 29 日

回答済み:

2017 年 11 月 29 日

Community Treasure Hunt

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

Start Hunting!

Translated by