How can I import data from Excel for control MIMO system with narxnet function? I have 5 inputs and 1 output, each with 150 training data.

1 回表示 (過去 30 日間)
%%1. Importing data this is for SISO model
S = load('magdata');
X = con2seq(S.u);
T = con2seq(S.y);
%%2. Data preparation
N = 300; % Multi-step ahead prediction
% Input and target series are divided in two groups of data:
% 1st group: used to train the network
inputSeries = X(1:end-N);
targetSeries = T(1:end-N);
inputSeriesVal = X(end-N+1:end);
targetSeriesVal = T(end-N+1:end);
%%3. Network Architecture
delay = 2;
neuronsHiddenLayer = 50;
% Network Creation
net = narxnet(1:delay,1:delay,neuronsHiddenLayer);
%%4. Training the network
[Xs,Xi,Ai,Ts] = preparets(net,inputSeries,{},targetSeries);
  2 件のコメント
Walter Roberson
Walter Roberson 2012 年 8 月 24 日
(No obvious reason to close this question.)
Greg Heath
Greg Heath 2012 年 8 月 26 日
The code in the text appears to be just an example from the documentation and has nothing to do with the OP's particular problem.
I agree with the OP for removal.

サインインしてコメントする。

回答 (1 件)

Morteza Hajitabar Firuzjaei
Morteza Hajitabar Firuzjaei 2018 年 1 月 25 日
Dear Lejla,
for simplefy your work, convert your excel to .mat matlab file abd then import your multiple input multiple output data for inputs and targets using:
load('input.mat');
X = tonndata(inputData(:,(1:3)),false,false);
T = tonndata(inputData(:,1),false,false);
and then enjoy your code
sincerely,
Morteza Hajitabar Firuzjaei

カテゴリ

Help Center および File ExchangeSequence and Numeric Feature Data Workflows についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by