clc;
clearvars;
close all;
% loading data
load data;
% Normal, Asthma , .., --> that is variable which i used to store audio files in them
overall_dataset =[Normal; Asthma; Pneumonia; BRON; COPD; HeartFailure];

 채택된 답변

Walter Roberson
Walter Roberson 2022년 8월 15일
Unless the files are all the same sampling frequency and the same number of samples and the same number of channels, then I recommend
overall_dataset = {Normal; Asthma; Pneumonia; BRON; COPD; HeartFailure};
along with storing the sampling frequency for each in a numeric vector unless you know that they are all the same.

댓글 수: 2

but theey have different number of samples :(
Then use {} like I show. Afterwards you would be able to do things such as
size(overall_dataset{2}, 1)
to find the number of samples for the Asthma dataset.
Depending what you are doing, you might want to instead create a table,
dataset_name = {'Normal'; 'Asthma'; 'Pneumonia'; 'BRON'; 'COPD', 'HeartFailure'};
Data = {Normal; Asthma; Pneumonia; BRON; COPD; HeartFailure};
Frequency = [18000; 12000; 18000; 18000; 36000; 12000];
T = table(Data, Frequency, 'RowNames', dataset_name);
Afterwards you would be able to do things like
T.Frequency('Asthma')

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

도움말 센터File Exchange에서 Signal Processing Toolbox에 대해 자세히 알아보기

제품

릴리스

R2020a

질문:

2022년 8월 15일

댓글:

2022년 8월 15일

Community Treasure Hunt

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

Start Hunting!

Translated by