MATLAB Programming Fundamentals - MathWorks
Perry 'Female' 64 120 Alexander 'Male' 69 171 T3 is a 15-by-3 table. Create Array from the Contents of Table This example shows ...
A is a 5-by-2 numeric array. Extract Data from One Variable Use dot indexing to easily extract the contents of a single variable ...
To specify a subset of rows for a single variable, you can follow the dot indexing with parentheses or curly braces. Extract the ...
More About “Advantages of Using Tables” on page 9-66 9 Tables ...
Calculations on Tables This example shows how to perform calculations on tables. The functions rowfun and varfun each apply a sp ...
Gender: 10x1 cell array of character vectors Test1: 10x1 double Values: Min 75 Median 86.5 Max 96 Test2: 10x1 double Values: Min ...
JAMES 'male' 78 75 77 76.667 WATSON 'female' 91 94 92 92.333 BROOKS 'female' 86 83 85 84.667 KELLY 'male' 79 76 82 79 Alternativ ...
Change Variable Name Change the variable name from TestAvg to Final. T.Properties.VariableNames{end} = 'Final' T=10×5 table Gend ...
Split Data into Groups and Calculate Statistics This example shows how to split data from the patients.mat data file into groups ...
The findgroups function returns G, a vector of group numbers created from Smoker. The splitapply function uses G to split Weight ...
Male true 181.14 T.gender contains categorical values, and T.smoker contains logical values. The data types of these table varia ...
stdDiastolicPF = splitapply(@std,Diastolic(I),G(I)); stdDiastolicGE = splitapply(@std,Diastolic(~I),G(~I)); Collect results in a ...
Split Table Data Variables and Apply Functions This example shows how to split power outage data from a table into groups by reg ...
maxLoss = 5×1 104 × 2.3141 2.3418 0.8767 0.2796 1.6659 Calculate the maximum power loss due to a power outage by cause. To speci ...
ans=15×3 table Region Cause maxLoss MidWest attack 0 MidWest energy emergency 2378.7 MidWest equipment fault 903.28 MidWest sev ...
NorthEast energy emergency 11638 1.4391e+05 NorthEast equipment fault 794.36 3.9961e+05 NorthEast fire 872.96 6.1292e+05 NorthEa ...
Related Examples “Access Data in a Table” on page 9-44 “Calculations on Tables” on page 9-53 “Split Data into Groups and Calcul ...
Advantages of Using Tables Conveniently Store Mixed-Type Data in Single Container You can use the table data type to collect mix ...
ans=5×4 table Gender Age Smoker BloodPressure Male 38 true 124 93 Male 43 false 109 77 Female 38 false 125 83 Female 40 false 1 ...
Age: 38 Smoker: 1 BloodPressure: [124 93] Fields in a structure array are analogous to variables in a table. However, unlike wit ...
«
18
19
20
21
22
23
24
25
26
27
»
Free download pdf