plot_sequence.m

来自「回声状态神经网络(ESN)是一种性能优异的递归神经网络」· M 代码 · 共 35 行

M
35
字号
function plot_sequence(teacherSequence, predictedSequence, nPoints, caption)% PLOT_SEQUENCE plots each dimension from the both the teacherSequence and% the sequence predicted by the network. The first nPoints values from each% sequence are plotted. %% inputs: % teacherSequence: matrix of size nDataPoints x nDimensions% predictedSequence: matrix of size nDataPoints x nDimensions% nPoints: a natural number. %           The first nPoints from the input time series are plotted% caption: a string containing the caption of the figure%% Created April 30, 2006, D. Popovici% Copyright: Fraunhofer IAIS 2006 / Patent pending% Revision 1, Feb 23, 2007, H. Jaegerif nargin == 3    caption = '' ; endnFigure = figure ;nDimensions = length(teacherSequence(1,:)) ; for iPlot = 1 : nDimensions    subplot(nDimensions,1,iPlot) ;     %%%% set the caption of the figure        title(caption);    hold on ;     plot(teacherSequence(1:nPoints, iPlot),'r') ;     plot(predictedSequence(1:nPoints, iPlot)) ; end

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?