Repeating a variable with changing values in a long program

Status
Not open for further replies.

shegmite

Member level 1
Joined
Apr 8, 2012
Messages
33
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,286
Visit site
Activity points
1,496
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
 

Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…