Info
This question is closed. Reopen it to edit or answer.
matrix element is not controlled through function
1 view (last 30 days)
Show older comments
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 Comments
Answers (1)
Titus Edelhofer
on 17 Dec 2012
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
This question is closed.
See Also
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!