load("stormData"); summaryRegionCosts = groupsummary(stormData, 'Region',{'min','median','mean','max'}, 'Total_Cost') stormDataPos = stormData(stormData.Total_Cost> 0, :) summaryRegionPosCosts = groupsummary(stormDataPos, 'Region',{'min','median','mean','max'},'Total_Cost') This is the correct answer.
load("stormData"); summaryRegionCosts = groupsummary(stormData, 'Region',{"min","max","median","mean"} , 'Total_Cost'); stormDataPos = stormData.Total_Cost> 0 ; summaryRegion
2 views (last 30 days)
Show older comments
Teklebirhan Abraha
on 6 Sep 2022
Answered: Teklebirhan Abraha
on 10 Sep 2022
What is wrong with my code
l
load("stormData");
summaryRegionCosts = groupsummary(stormData, 'Region',{'min','median','mean','max'}, 'Total_Cost')
stormDataPos = stormData(stormData.Total_Cost> 0, :)
Total = stormData.Total_Cost>0;
summaryRegionPosCosts = groupsummary(stormData, 'Region',{'min','median','mean','max'},'Total')
0 Comments
Accepted Answer
More Answers (1)
Stephen Tete
on 8 Sep 2022
Edited: Stephen Tete
on 8 Sep 2022
I’m not sure what your error is but I suggest you load with “readtable”
Else post your error let’s see
2 Comments
Stephen Tete
on 10 Sep 2022
Great, kindly post your solution here as others may find it helpful. Thank you
See Also
Categories
Find more on Mathematics and Optimization in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!