MATLAB Programming Fundamentals - MathWorks

(やまだぃちぅ) #1
Change Variable Name

Change the variable name from TestAvg to Final.

T.Properties.VariableNames{end} = 'Final'

T=10×5 table
Gender Test1 Test2 Test3 Final
________ _____ _____ _____ ______

HOWARD 'male' 22.5 21.75 23.25 22.5
WARD 'male' 21.75 21.25 20.75 21.25
TORRES 'male' 21.5 21.25 22 21.583
PETERSON 'female' 18.75 20 18 18.917
GRAY 'female' 22.25 21.5 21.75 21.833
RAMIREZ 'female' 24 23 24.5 23.833
JAMES 'male' 19.5 18.75 19.25 19.167
WATSON 'female' 22.75 23.5 23 23.083
BROOKS 'female' 21.5 20.75 21.25 21.167
KELLY 'male' 19.75 19 20.5 19.75

See Also
findgroups | rowfun | splitapply | summary | table | varfun

Related Examples



  • “Access Data in a Table” on page 9-44

  • “Split Table Data Variables and Apply Functions” on page 9-61


9 Tables

Free download pdf