Main Content

plotresponse

Plot dynamic network time series response

Syntax

plotresponse(t,y)
plotresponse(t1,'name',t2,'name2',...,y)
plotresponse(...,'outputIndex',outputIndex)

Description

plotresponse(t,y) takes a target time series t and an output time series y, and plots them on the same axis showing the errors between them.

plotresponse(t1,'name',t2,'name2',...,y) takes multiple target/name pairs, typically defining training, validation and testing targets, and the output. It plots the responses with colors indicating the different target sets.

plotresponse(...,'outputIndex',outputIndex) optionally defines which error element is being correlated and plotted. The default is 1.

Examples

Plot Target and Output Time Series Data

This example shows how to use a NARX network to solve a time series problem.

[X,T] = simplenarx_dataset;
net = narxnet(1:2,20);
[Xs,Xi,Ai,Ts] = preparets(net,X,{},T);
net = train(net,Xs,Ts,Xi,Ai);

Figure Neural Network Training (05-Sep-2024 18:40:59) contains an object of type uigridlayout.

Y = net(Xs,Xi,Ai);
plotresponse(Ts,Y)

Figure Time-Series Response (plotresponse) contains 2 axes objects. Axes object 1 with title Response of Output Element 1 for Time-Series 1, ylabel Output and Target contains 4 objects of type line. One or more of the lines displays its values using only markers These objects represent Errors, Response, Targets, Outputs. Axes object 2 with xlabel Time, ylabel Error contains 3 objects of type line. One or more of the lines displays its values using only markers This object represents Targets - Outputs.

Version History

Introduced in R2010b