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
1 次查看(过去 30 天)
显示 更早的评论
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 个评论
采纳的回答
更多回答(1 个)
Stephen Tete
2022-9-8
编辑:Stephen Tete
2022-9-8
I’m not sure what your error is but I suggest you load with “readtable”
Else post your error let’s see
2 个评论
Stephen Tete
2022-9-10
Great, kindly post your solution here as others may find it helpful. Thank you
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Mathematics and Optimization 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!