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
5 visualizzazioni (ultimi 30 giorni)
Mostra commenti meno recenti
Teklebirhan Abraha
il 6 Set 2022
Risposto: Teklebirhan Abraha
il 10 Set 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 Commenti
Risposta accettata
Più risposte (1)
Stephen Tete
il 8 Set 2022
Modificato: Stephen Tete
il 8 Set 2022
I’m not sure what your error is but I suggest you load with “readtable”
Else post your error let’s see
2 Commenti
Stephen Tete
il 10 Set 2022
Great, kindly post your solution here as others may find it helpful. Thank you
Vedere anche
Categorie
Scopri di più su Loops and Conditional Statements in Help Center e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!