如何使用循环在不同的图中绘制不同的文件信息

时间:2019-07-19 14:02:42

标签: octave

我有一个八度程序,可以读取文件,然后某些函数会使用该数据的不同部分进行绘制。但是现在我想读取所有文件并为每个文件创建一个图。我已经阅读了这些文件的程序,但是在绘图时,它会创建多个绘图,但是它们具有相同的数据文件(第一个数据文件)。

我已经尝试过使用on and hold off,但是没有用。


%%% - To read files
for i = 1:length(myfiles)            % Loop with the number of files
 files   = myfiles(i).name;       % Structure element with file's names
 n(:,:,i)= dlmread(files,'',23,1);% To read the contain

%========================================================================%
% Calling all functions
%========================================================================%

%--- Function config_horizontale which plot X position and has the respective info

[Nmean1m,Nmean2m,Nmean3m,Nmean4m,Nmean5m,Nmean1p,Nmean2p,Nmean3p]=...
config_horizontale(n,confi,visu,time,tps,N1m,N2m,N3m,N4m,N5m,N1p,N2p,N3p); 

end
'''
AND THIS IS A PART OF THE FUNCTION

''' function [Nmean1m,Nmean2m,Nmean3m,Nmean4m,Nmean5m,Nmean1p,Nmean2p,Nmean3p]=config_horizontale(n,confi,visu,time,tps,N1m,N2m,N3m,N4m,N5m,N1p,N2p,N3p)

%=========================================================================%
% To plot in x & y direction
%=========================================================================%
i=1;
figure 
plot(xM,Nmean1m(:,:,i),'-+')

因为'i'是文件的数量,所以我需要先绘制第一个文件,然后绘制第二个文件,依此类推。预先感谢。

0 个答案:

没有答案