eval function in for-loop and change of numbers bigger through NaN
I have 108 variables with same name but with consecutive numbering. Each of this variables I want to check if there is a value bigger 1000. When yes, then it will be exchanged through NaN.
I try to solve with eval and for-loop, but it doesn’t work.
I know the function which changes a value bigger 1000 through NaN.
Function: Temperatur_1(Temperatur_1>1000)=NaN;
Dynamics variabels are: Temperatur_1, Temperatur_2, etc.
eval-function: eval(strcat(‘Temperatur_’,num2str(e)))
for i=1:108
tbd
end
What is the function for checking each variable for > 1000 and saving it in the same variable?
Thank you in advance for your support and solution.I have 108 variables with same name but with consecutive numbering. Each of this variables I want to check if there is a value bigger 1000. When yes, then it will be exchanged through NaN.
I try to solve with eval and for-loop, but it doesn’t work.
I know the function which changes a value bigger 1000 through NaN.
Function: Temperatur_1(Temperatur_1>1000)=NaN;
Dynamics variabels are: Temperatur_1, Temperatur_2, etc.
eval-function: eval(strcat(‘Temperatur_’,num2str(e)))
for i=1:108
tbd
end
What is the function for checking each variable for > 1000 and saving it in the same variable?
Thank you in advance for your support and solution. I have 108 variables with same name but with consecutive numbering. Each of this variables I want to check if there is a value bigger 1000. When yes, then it will be exchanged through NaN.
I try to solve with eval and for-loop, but it doesn’t work.
I know the function which changes a value bigger 1000 through NaN.
Function: Temperatur_1(Temperatur_1>1000)=NaN;
Dynamics variabels are: Temperatur_1, Temperatur_2, etc.
eval-function: eval(strcat(‘Temperatur_’,num2str(e)))
for i=1:108
tbd
end
What is the function for checking each variable for > 1000 and saving it in the same variable?
Thank you in advance for your support and solution. eval, dynamic variable MATLAB Answers — New Questions