主要内容

plotresponse

绘制动态网络时间序列响应

语法

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

说明

plotresponse(t,y) 接收一个目标时间序列 t 和一个输出时间序列 y,并将它们绘制在同一坐标轴上,显示它们之间的误差。

plotresponse(t1,'name',t2,'name2',...,y) 接收多个目标/名称对组(通常用于定义训练、验证和测试目标)以及输出。它绘制响应图,以不同颜色指示不同的目标集。

plotresponse(...,'outputIndex',outputIndex) 可以定义要进行相关性分析和绘制的误差元素。默认值为 1。

示例

绘制目标时间序列数据和输出时间序列数据

此示例说明如何使用 NARX 网络来求解时间序列问题。

[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 (09-Aug-2025 13:38:31) 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.

版本历史记录

在 R2010b 中推出