[問題] 我一直卡在第36條 可以請各位幫我看看我少了啥 改怎麼解決..已回收
這是我的程式 一直卡在第36條有問題
錯誤訊息是??? Error using ==> times
Matrix dimensions must agree.
Error in ==> Nu_center_mean at 36
nuc=nu.*tes;
......................以下為程式..............................
ss=xlsread(['D:\RKK data\反吹線bg.xlsx'],'s','A1:IF320');
%for re=[900 1800 2700 4000 6000 8000 10000 12000 14000 20000 25000 ]
for re=[900]
nu=xlsread(['D:\RKK data\tw\re',num2str(re),'.xlsx'],'nu','A1:IF320');
ss(1:160,1:22)=0;
ss=round(ss);
as=find(nu>500); nu(as)=0;
as=find(nu<0);nu(as)=0;
nu(1:160,1:22)=0;
nu(:,1:9)=0;
%figure(1);
%clf;
%xc=320; yc=240;
%axis equal;
%hold on;
%contourf(1:yc,1:xc,ss,[30:50:500],'linestyle','none');
%figure(re);
%clf;
%axis equal;
%hold on;
%contourf(1:yc,1:xc,nu,[30:10:120],'linestyle','none');[ix,iy]
count=0;
for s=[30:2:1566];
count=count+1;
nu=find((ss>s-1 & ss<=s+1));
tes=zeros(320,240);
tes(ix,iy)=1;
nuc=nu.*tes;
inr=find(nuc>0);
num=mean(nuc(inr));
data(count,1)=s;data(count,2)=num;
end
data(:,1)=data(:,1)./20;
%axis equal;
xlswrite(['D:\RKK data\Nu分佈.xlsx'],data,num2str(re),'A1');
hold on;
plot(data(:,1),data(:,2))
end
xlim( [0 80]);ylim( [50 250]);
--
※ 發信站: 批踢踢實業坊(ptt.cc)
◆ From: 192.83.195.229
→
06/27 01:10, , 1F
06/27 01:10, 1F
→
06/27 01:17, , 2F
06/27 01:17, 2F
→
06/27 10:39, , 3F
06/27 10:39, 3F
MATLAB 近期熱門文章
PTT數位生活區 即時熱門文章