📄 correlation.m
字号:
%correlation.m/created by PJNahin for "Duelling Idiots"(1/30/99)
%This m-file plots the scatter diagram of the points (x(i),x(i+j))
%for any value of j => 0.
%
%
rand('state',100*sum(clock)); %set new seed for generator;
clear data
clear x
clear y
j=input('What is j? ');
stop=1000+j;
data=zeros(1,stop);
for i=1:stop
data(i)=rand;
end
for i=1:1000
x(i)=data(i);
y(i)=data(i+j);
end
plot(x,y,'.')
xlabel('j = 9')
title('1000-Point Scatter Diagram for MATLAB 5.2 Uniform Random Number Generator')
figure(1)
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -