Add a certain row to each new row generated by same loop function ! HOW!
Mostrar comentarios más antiguos
How can I add a certain row generated by a loop function to each new row generated by same loop function? Thanks in advance!
for k=1:1:100
for i=x1:1:x3
% x1<x2<x3
if i<x2
[a(i,k),b(i,k),c(i,k)]=function(input1(i),input2(k));
else
% this is my (certain) row (at i=x2) to be added
[a(x2,k),b(x2,k),c(x2,k)]=function(input1(i),input2(k))
% above row to be added to each row of below function:
[a(i,k),b(i,k),c(i,k)]=function(input1(i),input2(k));
end
end
end
1 comentario
James Tursa
el 25 de Jul. de 2013
Editada: James Tursa
el 25 de Jul. de 2013
This is unreadable ... please use the "{} Code" button to format your code.
Respuesta aceptada
Más respuestas (0)
Categorías
Más información sobre Loops and Conditional Statements en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!