How to Add Uitable Second Column as the Sum of the First Column

2 ビュー (過去 30 日間)
Murat Kocaman
Murat Kocaman 2018 年 10 月 4 日
コメント済み: Murat Kocaman 2018 年 10 月 5 日
Hello,
I have an output which gives the values of objects in an image. I would like to add second column with the sum of the values of first column.
MaxValue= power((4/pi)*areaValues/CalibrationValue , 3/2)*372*power(10, -5);
TotalMaxValue = sum(MaxValue);
uitable('Data', [MaxValue],...
'ColumnName', {'MaxValue' 'TotalMaxValue'}, ...
'Position', [20 20 150 150]);
This part provides a table with 2 column but TotalMaxValue column is empty. There is only Headline on it.
How could I do that?
  4 件のコメント
Adam
Adam 2018 年 10 月 4 日
Well you can't have only 1 row in one column if you have more rows in another column. If it is always going to be same value in every row of a column a table doesn't seem like the appropriate place to have this information, but if it is what you really want just use
doc repmat
to replicate your TotalMaxValue to the same size as MaxValue and then concatenate them
Murat Kocaman
Murat Kocaman 2018 年 10 月 5 日
Thank you it is solved by creating second uitable.

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

回答 (0 件)

カテゴリ

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

タグ

製品


リリース

R2017a

Community Treasure Hunt

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

Start Hunting!

Translated by