0
私はRBFニューラルネットワークを作成してトレーニングするために.datファイルのデータを使用しようとしています。しかし、私はそれの列を使用する方法を知らない入力とターゲットネットワーク内のデータです。Matlab:ニューラルネットワークで.datファイルを使用するには?
これは、MathWorks社のMATLABでのファイルの画像です: train.dat
私はこの試みた:私の質問は、私はtrain.datを開くために最初に書くべきコードである
fid = fopen('train.dat','r');
A = fscanf(fid, '%f');
C1 = textscan(fid,'%s%f%s%f'); %read the first line
nb_col = C1{4}; %get the number of columns (could be set by user too)
%read the remaining of the file
C2 = textscan(fid, repmat('%f',1,nb_col), 'CollectOutput',1);
fclose(fid); %close the connection
をファイルを作成し、最初の列をベクトル(パターン)に入れ、それを別のベクトル(ターゲット)の3番目の列に入れますか?