for loops auto nidification problem
I have a function y= f(x) .
x is 10 x n and y= 1 x n
a performance function myperf = perf(y) gives a 1 x 1 value.
a target value mytar must be reached.
if mytar is not reached I must reiterate the process in this way :
for i=1:10
y(i)=f(x(i));
end
x=y % it must be 10 x n
and finally …
y=f(x);
So if myperf = perf(y) > mytar I must continue.
I can’t known how much iteration I’ll need.
x dimension is 10^niteration x n ( 10 ,100 ,1000 … 10^niteration)
I must pay attention to use intermediate results to not reinitialize the algorithm every time and loose resources.
What type of architecture cold I use ?
The most symple and understandable ?
Thanks !I have a function y= f(x) .
x is 10 x n and y= 1 x n
a performance function myperf = perf(y) gives a 1 x 1 value.
a target value mytar must be reached.
if mytar is not reached I must reiterate the process in this way :
for i=1:10
y(i)=f(x(i));
end
x=y % it must be 10 x n
and finally …
y=f(x);
So if myperf = perf(y) > mytar I must continue.
I can’t known how much iteration I’ll need.
x dimension is 10^niteration x n ( 10 ,100 ,1000 … 10^niteration)
I must pay attention to use intermediate results to not reinitialize the algorithm every time and loose resources.
What type of architecture cold I use ?
The most symple and understandable ?
Thanks ! I have a function y= f(x) .
x is 10 x n and y= 1 x n
a performance function myperf = perf(y) gives a 1 x 1 value.
a target value mytar must be reached.
if mytar is not reached I must reiterate the process in this way :
for i=1:10
y(i)=f(x(i));
end
x=y % it must be 10 x n
and finally …
y=f(x);
So if myperf = perf(y) > mytar I must continue.
I can’t known how much iteration I’ll need.
x dimension is 10^niteration x n ( 10 ,100 ,1000 … 10^niteration)
I must pay attention to use intermediate results to not reinitialize the algorithm every time and loose resources.
What type of architecture cold I use ?
The most symple and understandable ?
Thanks ! matlab, for loop MATLAB Answers — New Questions