这就是我想要做的:我有下图(称为相空间图):
相空间图 http://www.thestudentroom.co.uk/attachment.php?attachmentid=185627&d=1354917185
我正在关注的论文说:
将信号的相空间图划分为 20x20 方格,计算方格内的点数 c(i,j) 以形成相空间密度矩阵 c。
我尝试了以下代码来执行上述操作:
%%matrix(1,:) Is the first row and all columns. This row has the actual signal of
%interest and corresponds to the x axis of the above graph.
and is the x axis of the above graph.
%matrix(2,:) Is the second row and all columns and comprises of the y axis of the
above graph.
for i=1:180:size(matrix,2)
for j=1: 180 : size(matrix,2)
if isnan(matrix(1,i))
else
c(1,i)=matrix(1,i);
end
if isnan(matrix(2,i))
else
c(2,i)=matrix(2,j);
end
end
end
figure,plot(c)
输出是:
我打算得到这样的东西:
论文 http://www.thestudentroom.co.uk/attachment.php?attachmentid=185629&d=1354918102
LHS 是相空间图,RHS 对应于我试图达到的各个图。
请帮忙!!!
将不胜感激。
谢谢!