Kindly help me with this problem of groupsummary

2 views (last 30 days)
load("stormData");
summaryRegionCosts = groupsummary(stormData, 'Region',{"min","max","median","mean"} , 'Total_Cost');
stormDataPos = stormData.Total_Cost> 0 ;
summaryRegionPosCosts = groupsummary(stormData, 'Region', {"min","max","median","mean"},'stormDataPos');

Answers (2)

Sumon
Sumon on 20 Mar 2023
summaryRegionCosts = groupsummary(stormData, 'Region', ["min","median","mean","max"], 'Total_Cost');
idx = stormData.Total_Cost> 0;
stormDataPos= stormData(idx,:);
summaryRegionPosCosts = groupsummary(stormDataPos,'Region',["min","median","mean","max"],'Total_Cost');

VBBV
VBBV on 15 Dec 2022
TT = load("stormData");
summaryRegionCosts = groupsummary(TT, 'Region',{"min","max","median","mean"} , 'Total_Cost');
stormDataPos = stormData.Total_Cost> 0 ;
summaryRegionPosCosts = groupsummary(stormData, 'Region', {"min","max","median","mean"},'stormDataPos');
Load the data into variable TT and call it in groupsummary

Community Treasure Hunt

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

Start Hunting!