Subscript indices must either be real positive integers or logicals?
matlab 请教t0=0;tf=1e-7;dt=2e-9;t1=2e-8;t=t0:dt:tf;
f(t>=2e-8)=0;
f(t<2e-8)=1;
for i=1:51
k3(i)=500*f(t(i))
end
运行后:
Subscript indices must either be real positive integers or logicals.
[ 本帖最后由 ChaChing 于 2009-7-11 18:51 编辑 ]
回复:(asd)matlab 请教
t0=0;tf=1e-7;dt=2e-9;t1=2e-8;t=t0:dt:tf;<BR>for i=1:51<BR> f(t(i)>=2e-8)=0;<BR> f(t(i)<2e-8)=1;<BR> k3(i)=500*f;<BR>end<BR> thank you very much!
页:
[1]