Kindly help me solve this problem...

2 visualizaciones (últimos 30 días)
Umair Ejaz
Umair Ejaz el 5 de Sept. de 2022
Comentada: Umair Ejaz el 8 de Sept. de 2022
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');

Respuestas (1)

Sailesh Kalyanapu
Sailesh Kalyanapu el 8 de Sept. de 2022
As per my understanding you are trying to use 'groupsummary' function to create a table to show the min, max, median and mean total cost by region for the subset of data which has total cost greater than zero.
It seems that the input arguments are being passed incorrectly in the (line 4) of your solution
% This modification would solve the issue
summaryRegionPosCosts = groupsummary(stormDataPos, 'Region', {"min","max","median","mean"},'Total_Cost');
For more information on ‘groupsummary’, please refer to the below link to its documentation:

Categorías

Más información sobre Platform and License en Help Center y File Exchange.

Productos


Versión

R2022a

Community Treasure Hunt

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

Start Hunting!

Translated by