• Регистрация
Bomberman
Bomberman +1.00
н/д

Оценка распределения модуля мгновенных значений фонограммы

11.01.2023

Здравствуйте! Получил задание на разработку алгоритма и программы, реализующих оценку распределения модуля мгновенных значений фонограммы.

1) Разработать методику, алгоритм и программу оценки распределния модуля мгновенных значений фонограммы;

2) Разработать алгоритм определения моды распределния.

Может ли кто-нибудь, пожалуйста, помочь с программой в MATLAB, ибо я полный профан в этой области

Теги

      11.01.2023

      Лучший ответ

      • alextip+46.13
        13.01.2023 12:00

        В DSP тулбоксе есть аудиофайлик, его можно использовать для примера.

        %%
        audio = dsp.AudioFileReader('guitartune.wav', ...
        'SamplesPerFrame',44100);
        x = audio();

        %Модули мгновенной амплитуды с вырезанной паузой (нулевыми значениями)
        x=abs(x(x~=0));

        %Гистограмма
        histogram(x,'Normalization','pdf');
        hold on

        %Пусть это будет логнормальное распределение

        pd = fitdist(x,'Lognormal');

        %Можно pdf построить дополнитльно к гистограмме
        x_vals = 0:0.01:0.5;
        y = pdf(pd,x_vals);
        plot(x_vals,y,'LineWidth',2)

        %Мода
        md = mode(x);
        %Дорисовываем моду на графике
        xline(md,'LineWidth',2,'LineStyle','--')
        hold off

      Ответы

      • annastark
        annastark0.00
        12.01.2023 02:51

        Your writing is really informative, especially because it's so meaningful and updated. Thanks for sharing this wonderful post! Retro Bowl game  

        • alextip
          alextip+46.13
          12.01.2023 18:46

          Вы бы сначала алгоритм подробный расписали - какие входные данные, какие формулы, тогда может и подсказать что-то получится.

          • alextip
            alextip+46.13
            12.01.2023 19:35

            Хотелось еще бы понять, что имеется в виду под оценкой распределения модулей? Нужно закон распределения получить? Есть ли какие-то сведения о возможном характере распределения?

            • aBoomest
              aBoomest+942.89
              13.01.2023 04:47

              Фонограмма - это звук какой-то?
              Модуль - это на подобие выпрямленного сигнала?
              Из того, что написано думается можно гистограмму для начала (ф-ции hist, bar, и т.п.)
              А вот алгоритм "реализующий оценку распределения" - это либо что-то очень простое заумно написано, либо реально что-то крутое, но тогда нужна еще информация об этом всем.

              • alextip
                alextip+46.13
                13.01.2023 07:12

                В DSP тулбоксе есть аудиофайлик, его можно использовать для примера.

                %%
                audio = dsp.AudioFileReader('guitartune.wav', ...
                'SamplesPerFrame',44100);
                x = audio();

                %Модули мгновенной амплитуды с вырезанной паузой (нулевыми значениями)
                x=abs(x(x~=0));

                %Гистограмма
                histogram(x,'Normalization','pdf');
                hold on

                %Пусть это будет логнормальное распределение

                pd = fitdist(x,'Lognormal');

                %Можно pdf построить дополнитльно к гистограмме
                x_vals = 0:0.01:0.5;
                y = pdf(pd,x_vals);
                plot(x_vals,y,'LineWidth',2)

                %Мода
                md = mode(x);
                %Дорисовываем моду на графике
                xline(md,'LineWidth',2,'LineStyle','--')
                hold off

                • jacobjones
                  jacobjones0.00
                  10.02.2023 04:41

                  Sure, I'd be happy to help you with that.

                  The first step would be to understand what a phonogram is and what you mean by the "module of instant phonogram values." A phonogram is typically a representation of sound, either in the form of an audio recording or a visual representation like a spectrogram. The "module of instant phonogram values" refers to the magnitude of the values at each point in time in the phonogram.

                  To calculate the module, you can use the absolute value function in MATLAB, which returns the magnitude of a complex number or the absolute value of a real number.

                  Here is an example MATLAB code for calculating the module of instant phonogram values:


                  % Load the phonogram data
                  phonogram = load('phonogram.mat');

                  % Calculate the module of the instant phonogram values
                  module = abs(phonogram);

                  % Plot the resulting module values
                  plot(module);
                  xlabel('Time (s)');
                  ylabel('Module Value');

                  For determining the distribution of the module of instant phonogram values, you can use the hist function in MATLAB to calculate the histogram of the module values. The histogram can give you an idea of the distribution of the module values, allowing you to see how frequently certain values occur in your data.

                  Here is an example MATLAB code for calculating the distribution of the module of instant phonogram values:

                  % Load the phonogram data
                  phonogram = load('phonogram.mat');

                  % Calculate the module of the instant phonogram values
                  module = abs(phonogram);

                  % Calculate the histogram of the module values
                  [counts, binCenters] = hist(module, 100);

                  % Plot the histogram
                  bar(binCenters, counts, 'hist');
                  xlabel('Module Value');
                  ylabel('Count');

                  For determining the mod of distribution, you can use the mode function in MATLAB to calculate the modal value, which is the value that occurs most frequently in the data.

                  Here is an example MATLAB code for determining the mod of distribution:

                  % Load the phonogram data
                  phonogram = load('phonogram.mat');

                  % Calculate the module of the instant phonogram values
                  module = abs(phonogram);

                  % Calculate the histogram of the module values
                  [counts, binCenters] = hist(module, 100);

                  % Determine the mod of distribution
                  [~, index] = max(counts);
                  mod = binCenters(index);

                  % Display the mod of distribution
                  disp(['Mod of Distribution: ', num2str(mod)]);

                  I hope this helps you get started on your project! If you have any questions or need further assistance, please let me know.

                   

                  Henry | pool repair service winter park