Info
この質問は閉じられています。 編集または回答するには再度開いてください。
matrix element is not controlled through function
1 回表示 (過去 30 日間)
古いコメントを表示
In the following situation, I expected jv to have 10 elements of same value. Result is that jv are all zero except jv(10). How can I solve this problem?
for nk=1:10
[j,jv,u]=Tflux(...,nk)
end
function [j,jv,u]=Tflux(...,nk)
jv(nk)=sa.*lp + si
end
0 件のコメント
回答 (1 件)
Titus Edelhofer
2012 年 12 月 17 日
Hi,
hmm, the interesting part is in the "...": do you pass jv into Tflux? I.e., do you have
for nk=1:10
[j,jv,u] = Tflux(jv, ..., nk);
end
function [j,v,u] = Tflux(jv, ..., nk)
jv(nk) = sa.*lp+si;
end
If yes it should work ...
Titus
この質問は閉じられています。
参考
製品
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!