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
3 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Teklebirhan Abraha
am 6 Sep. 2022
Beantwortet: Teklebirhan Abraha
am 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 Kommentare
Akzeptierte Antwort
Weitere Antworten (1)
Stephen Tete
am 8 Sep. 2022
Bearbeitet: Stephen Tete
am 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 Kommentare
Stephen Tete
am 10 Sep. 2022
Great, kindly post your solution here as others may find it helpful. Thank you
Siehe auch
Kategorien
Mehr zu Loops and Conditional Statements finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!