Filter löschen
Filter löschen

performing a function to a column in a table

20 Ansichten (letzte 30 Tage)
Yasmin Samy
Yasmin Samy am 30 Nov. 2017
Beantwortet: Jerry am 7 Jan. 2020
Hello, I have a table where GroupingVariables is month. It has 3 columns, the month, the groupcount, and the mean. I would like to get the exponential of just the third column of the table. How can that be done without having to extract the column and use horzcat? i used varfun to get the mean, so the columns have names. Thanks.
  3 Kommentare
Walter Roberson
Walter Roberson am 30 Nov. 2017
Do individual table entries have multiple values? If not then
Fine_avg.mean_file_perl = exp(Fine_avg.mean_File_pearllog);
Yasmin Samy
Yasmin Samy am 30 Nov. 2017
Thanks! that`s perfect!

Melden Sie sich an, um zu kommentieren.

Antworten (1)

Jerry
Jerry am 7 Jan. 2020
You can assign back your calculation to the original table like this:
Fine_avg(1:end, 'mean_Fine_pearllog') = varfun(@exp,Fine_avg,'InputVariables','mean_Fine_pearllog');

Kategorien

Mehr zu Tables finden Sie in Help Center und File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by