下面这段代码老是出现In an assignment A(I) = B, the number of elements in B and I must be the same

下面这段代码老是出现In an assignment A(I) = B, the number of elements in B and I must be the same

题目
下面这段代码老是出现In an assignment A(I) = B, the number of elements in B and I must be the same
f_ji=[];
f_ou=[];
for i=1:length(f)
if mod(i,2)~=0
f_ji=[f_ji,f(i)];
else
f_ou=[f_ou,f(i)];
end
end
for i=1:length(f_ji)
g(i)=d(:,f_ji(i):f_ou(i));
end
哪里出错了
答案
像似 g(i)=d(:,f_ji(i):f_ou(i)); 错了.
出错信息说,A(I) = B 这种形式的赋值语句,B 里的元素个数 与 I 要相等.
举一反三
已知函数f(x)=x,g(x)=alnx,a∈R.若曲线y=f(x)与曲线y=g(x)相交,且在交点处有相同的切线,求a的值和该切线方程.
我想写一篇关于奥巴马的演讲的文章,写哪一篇好呢?为什么好
奥巴马演讲不用看稿子.为什么中国领导演讲要看?
想找英语初三上学期的首字母填空练习……
英语翻译
最新试题
热门考点

超级试练试题库

© 2017-2019 超级试练试题库,All Rights Reserved.