Borrar filtros
Borrar filtros

Info

La pregunta está cerrada. Vuélvala a abrir para editarla o responderla.

matrix element is not controlled through function

1 visualización (últimos 30 días)
Hun Mo
Hun Mo el 17 de Dic. de 2012
Cerrada: MATLAB Answer Bot el 20 de Ag. de 2021
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

Respuestas (1)

Titus Edelhofer
Titus Edelhofer el 17 de Dic. de 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
  2 comentarios
Hun Mo
Hun Mo el 17 de Dic. de 2012
no jv in the input arguement. the inclusion is unnecessary but if included will it work without causing any troble? (i will try)
Hun Mo
Hun Mo el 17 de Dic. de 2012
id did not work.

La pregunta está cerrada.

Productos

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by