This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
clc | |
clear | |
int lines | |
int sample | |
int bands | |
lines=400; | |
sample=502; | |
bands=128; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1.typedef double real; | |
2.#define then | |
3. | |
4.#define A 16807L /* multiplier (7**5) for 'ranf' */ | |
5.#define M 2147483647L /* modulus (2**31-1) for 'ranf' */ | |
6. | |
7.static long In[16]= {0L, /* seeds for streams 1 thru 15 */ | |
8. 1973272912L, 747177549L, 20464843L, 640830765L, 1098742207L, | |
9. 78126602L, 84743774L, 831312807L, 124667236L, 1172177002L, | |
10. 1124933064L, 1223960546L, 1878892440L, 1449793615L, 553303732L}; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
% BP 神经网络用于函数拟合 | |
clc | |
clear | |
[filename, pathname]= uigetfile('*.xls'); %寻找源文件 | |
file=[pathname filename]; %赋名 | |
x=xlsread(file); %格式转换为矩阵 | |
% 产生训练样本与测试样本 | |
P1 = x(1:100,1:14)'; % 训练样本,每一列为一个样本 |
NewerOlder