How does the code "load data" produce P and T in Genetic Algorithm?

I have the code below:
clc
clear all
close all
load data
% 初始隐层神经元个数
hiddennum=31;
% 输入向量的最大值和最小值
threshold=[0 1;0 1;0 1;0 1;0 1;0 1;0 1;0 1;0 1;0 1;0 1;0 1;0 1;0 1;0 1];
inputnum=size(P,1); % 输入层神经元个数 15
outputnum=size(T,1); % 输出层神经元个数 3
and it is on the top position in my GAMain.m.
I am to design a toy BP network which has only one hidden layer with 31 neurons(hiddennum in line 6)and one input layer with inputnum neurons and a output layer that has outputnum neurons.
when I debug the .m file, confusedly I found the P had the size 15x9.
How P comes to 15X9?
Thanks in advance!(❁´◡`❁)

 採用された回答

Steven Lord
Steven Lord 2022 年 3 月 8 日

1 投票

Because that's the size of the P variable stored in the data file named data.mat. If you're asking where that variable came from, you'd have to ask who created the data.mat file.

その他の回答 (0 件)

カテゴリ

ヘルプ センター および File ExchangeElectrophysiology についてさらに検索

製品

リリース

R2019a

Community Treasure Hunt

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

Start Hunting!

Translated by