why do i get an error in my code?
古いコメントを表示
load("stormData");
stormData.Property_Cost(ismissing(stormData.Property_Cost))=0;
stormData.Crop_Cost(ismissing(stormData.Crop_Cost))=0;
stormData.Total_Cost(ismissing(stormData.Total_Cost))=0;
summaryRegionCosts= groupsummary(stormData, "Region", ["min", "median", "mean", "max"], "Total_Cost")
stormDataPos= stormData(stormData.Total_Cost > 0, :)
summaryRegionPosCosts= groupsummary(stormDataPos, ["min", "median", "mean", "max"], "Total_Cost")

回答 (2 件)
VBBV
2022 年 12 月 15 日
TT = load("stormData");
Load the data into variable nd use it in groupsummary
summaryRegionCosts= groupsummary(TT, "Region", ["min", "median", "mean", "max"], "Total_Cost")
4 件のコメント
if you load the data, do you view it as table array or numeric array ?
load("stormData");
groupsummary takes table or timetable data only as input source
Emem
2022 年 12 月 16 日
Walter Roberson
2022 年 12 月 16 日
移動済み: Walter Roberson
2022 年 12 月 16 日
1 投票
- before all of this your MATLAB path might be very messed up
- you might have a variable named "path" in your mat file that is messing everything up (but the message would be different for this case I think)
- most likely case: either before this you assign to a variable named "find" or else you are loading a variable named "find". The error message is completely compatible with the possibility that you have a variable named "find" stored in the file.
カテゴリ
ヘルプ センター および File Exchange で Data Preprocessing についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
