⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 main.m

📁 此程序为训练RBF网权值的量子粒子群优化算法
💻 M
字号:

clear;
format short
%input data sample  x



%归一化-------------------------------------------------------

    avg = mean(x);                %求均值,c为各列均值组成的行向量
    c=std(x);      %求标准差
   centerx=ones(M,1)*avg;
   %x1=x-centerx;
   %x2=x1./c(1);
   %avg1=mean(x1)
    
P1=x(1:200,2:N)'% train sample data input
T1=x(1:200,1)';   %train sample data
P2=(x(1:450,2:N))' % simulation  sample data input
T2=x000(1:450,1)';  % simulation  sample data output
     t=P1;
    tic;
    [parameters,MSE]=learnrbf(P1,T1,t);
    time=toc;
    Y1=output(P1,parameters,t);
    Y2=output(P2,parameters,t);
    figure(1)
    plot(T1);
    hold on;
    plot(Y1,'r');
    hold off;
    figure(2);
    plot(MSE);
     figure(3)
    plot(T2);
    hold on;
    plot(Y2,'r');
    hold off;
    
    

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -