![]() |
初学者关于 le 函数dimension一致的问题
新手初学,最近在网上弄到一个本领域内Matlab的程序,打算自己跑一下试试,结果中间出错。希望哪位达人有空可以指点一二,将不胜感激。以下是部分代码(如有需要我可以上传全部代码)。
[COLOR="Green"]matrix=[]; R=[1e-5,2e-5,5e-5,1e-4,2e-4,5e-4,1e-3,2e-3,5e-3,1e-2]; lengths=[1e-4,2e-4,5e-4,1e-3,2e-3,5e-3,1e-2,2e-2,5e-2,1e-1]; thing=length(lengths); N=length(R) count=1:N ..... thingee=1:thing L=lengths(thingee)*ones(1,N); aspectratio=L./R; Voc=zeros(1,N); Jsc=zeros(1,N); ...... ff=maxP./(Voc.*Jsc); arshort=aspectratio(ff<0.9999&ff>0); Lshort=L(ff<0.9999&ff>0); Rshort=R(ff<0.9999&ff>0); Vocshort=Voc(ff<0.9999&ff>0); Jscshort=Jsc(ff<0.9999&ff>0); ffshort=ff(ff<0.9999&ff>0); effshort=eff(ff<0.9999&ff>0); ..... M=[matrix; arshort', Lshort', Rshort', effshort', Jscshort', Vocshort', ffshort']; .... Rmin=min(M(:,3)); Rmax=max(M(:,3)); R=R((R>=Rmin)&(R<=Rmax)); ----------- 196[/COLOR] 错误报告如下: ??? Error using ==> le Matrix dimensions must agree. Error in ==> pnjunction at 196 R=R((R>=Rmin)&(R<=Rmax)); 应该说的是用le比较大小的两端dimension不一致,可是自己实在是想不明白了,只好上论坛求教,先谢过了。 |
所有时间均为北京时间。现在的时间是 14:10。 |
Powered by vBulletin
版权所有 ©2000 - 2025,Jelsoft Enterprises Ltd.