shegmite
Member level 1
Please can anybody help with how I can repeat a particular variable for certain changing values in a very long program and get the overall answers for those values changed in the variable without writing out the whole programs for each of the values changed using Matlab.For example:
H = 0.78 +/- 0.1 i.e. to be repeated for 0.78+0.1 and 0.78-0.1
U = 0.56
K = 8.4
V = U + K
G = H + V
L = G/V
disp(L) for H= 0.78 + 0.1
disp(L) for H= 0.78-0.1
H = 0.78 +/- 0.1 i.e. to be repeated for 0.78+0.1 and 0.78-0.1
U = 0.56
K = 8.4
V = U + K
G = H + V
L = G/V
disp(L) for H= 0.78 + 0.1
disp(L) for H= 0.78-0.1