필터 지우기
필터 지우기

performing a function to a column in a table

조회 수: 20 (최근 30일)
Yasmin Samy
Yasmin Samy 2017년 11월 30일
답변: Jerry 2020년 1월 7일
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
Walter Roberson
Walter Roberson 2017년 11월 30일
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 2017년 11월 30일
Thanks! that`s perfect!

댓글을 달려면 로그인하십시오.

답변 (1개)

Jerry
Jerry 2020년 1월 7일
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');

카테고리

Help CenterFile Exchange에서 Tables에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by