09 2011 档案
摘要:View Code 1 function result = matrix_change(X,m1,n1)2 %需要变换的矩阵,分割成m1*n1区域求均值3 [m,n] = size(X);4 solution=reshape(sum(reshape(X,m1,[])),[],n);5 solution_z=reshape(sum(reshape(solution',n1,[])),[],m/m1);6 result=solution_z'/(m1*n1);调用:View Code clc;A=[1 2 3 4 5 6 7 8 1 2 3 4 5 6 7 8 1 2 3 4 5
阅读全文
摘要:View Code 1 %% 2 clc; 3 clear; 4 %% 5 %半径 6 R=2; 7 %生成数据个数 8 n=1000; 9 %%10 a=2*pi*rand(1,n);11 12 rx1=R*rand(1,n);13 x1=sin(a).*rx1;y1=cos(a).*rx1;14 15 rx2=R*rand(1,n)+R+1;16 x2=sin(a).*rx2;y2=cos(a).*rx2;17 18 rx3=R*rand(1,n)+2*R+1+1;19 x3=sin(a).*rx3;y3=cos(a).*rx3;20 21 c=0:2*pi/100:2*pi;22 p..
阅读全文
浙公网安备 33010602011771号