how to extract subset from dataset?
2 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
mahmood aljamal
am 7 Dez. 2022
Kommentiert: Arif Hoq
am 7 Dez. 2022
Welcome
I have a dataset of type "CSV" named "NF" in which there is a column of type Categorecal named "Attack" and it has five categories: 'Benign', 'Theft', 'DDoS', 'DoS', and 'Reconnaissance' .
I want to extract a new dataset from this dataset "NF" based on the value of the column "Attack" if it is only equal to 'DDoS'![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/1222182/image.png)
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/1222182/image.png)
0 Kommentare
Akzeptierte Antwort
Arif Hoq
am 7 Dez. 2022
a=readtable("NF.xlsx");
aa=find(strcmp(a.Attack,'DDoS'));
aaa=a(aa,:)
11 Kommentare
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Standard File Formats 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!