Mavzu: Raqamli signallarni filtrlash jarayonlarini tahlil qilish


package com.blogspot.shulgadim.filters; import



Download 120,8 Kb.
bet3/4
Sana07.01.2022
Hajmi120,8 Kb.
#326574
1   2   3   4
Bog'liq
lab-3

package com.blogspot.shulgadim.filters;
import java.awt.*;

import javax.swing.*;

import org.jfree.chart.*;

import org.jfree.chart.plot.*;

import org.jfree.data.xy.*;
public class Plot { 

    private String name;

    private double x[] = null;

    private double y[] = null;   

    private String xName;

    private String yName;            

    private JFrame frame;               

    public Plot(String name, double x[], double y[],

                String xName, String yName) {

        this.name = name;

        this.x = x;

        this.y = y;       

        this.xName = xName;

        this.yName = yName;       

        frame = new JFrame("Figure");

        frame.getContentPane().setLayout(new BorderLayout());       

        frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);

        XYDataset dataset = createDataset();

        JFreeChart chart = createChart(dataset);

        ChartPanel chartPanel = new ChartPanel(chart);   

        frame.getContentPane().add(chartPanel, BorderLayout.CENTER);

        frame.setSize(400, 400);       

        frame.setVisible(true);       

    }


       

    private XYDataset createDataset() {

        XYSeries series = new XYSeries("");

        for(int i=0; i

            series.add(x[i],y[i]);  

        }       

        XYSeriesCollection dataset = new XYSeriesCollection();

        dataset.addSeries(series);                          

        return dataset;       

    }


       

    private JFreeChart createChart(final XYDataset dataset) {     

        final JFreeChart chart = ChartFactory.createXYLineChart(

            name,                              // chart title

            xName,                      // x axis label

            yName,                      // y axis label

            dataset,                      // data

            PlotOrientation.VERTICAL,

            false,                        // include legend

            false,                        // tooltips

            false                         // urls

        );      

        chart.setBackgroundPaint(Color.LIGHT_GRAY);   

        XYPlot plot = chart.getXYPlot();   

        plot.setBackgroundPaint(Color.WHITE)   

        plot.setDomainGridlinePaint(Color.LIGHT_GRAY);

        plot.setRangeGridlinePaint(Color.LIGHT_GRAY);       

        return chart;       

    }

}

Spectrum klassi signalni Fast Furye qatoriga o'zgartiradi. U ochiq manbali Java JTransforms kutubxonasidan foydalanadi. Spectrum kodi: package com.blogspot.shulgadim.filters;



Download 120,8 Kb.

Do'stlaringiz bilan baham:
1   2   3   4




Ma'lumotlar bazasi mualliflik huquqi bilan himoyalangan ©hozir.org 2024
ma'muriyatiga murojaat qiling

kiriting | ro'yxatdan o'tish
    Bosh sahifa
юртда тантана
Боғда битган
Бугун юртда
Эшитганлар жилманглар
Эшитмадим деманглар
битган бодомлар
Yangiariq tumani
qitish marakazi
Raqamli texnologiyalar
ilishida muhokamadan
tasdiqqa tavsiya
tavsiya etilgan
iqtisodiyot kafedrasi
steiermarkischen landesregierung
asarlaringizni yuboring
o'zingizning asarlaringizni
Iltimos faqat
faqat o'zingizning
steierm rkischen
landesregierung fachabteilung
rkischen landesregierung
hamshira loyihasi
loyihasi mavsum
faolyatining oqibatlari
asosiy adabiyotlar
fakulteti ahborot
ahborot havfsizligi
havfsizligi kafedrasi
fanidan bo’yicha
fakulteti iqtisodiyot
boshqaruv fakulteti
chiqarishda boshqaruv
ishlab chiqarishda
iqtisodiyot fakultet
multiservis tarmoqlari
fanidan asosiy
Uzbek fanidan
mavzulari potok
asosidagi multiservis
'aliyyil a'ziym
billahil 'aliyyil
illaa billahil
quvvata illaa
falah' deganida
Kompyuter savodxonligi
bo’yicha mustaqil
'alal falah'
Hayya 'alal
'alas soloh
Hayya 'alas
mavsum boyicha


yuklab olish