- #1
tactical
- 6
- 0
Programming in matlab. I have everything entered correctly, I just need help with iterating.
The program is similar to the following:
for i=0.1:0.99
calculates x1
for j=0.1:0.99
calculates x2
for k=0.1:0.99
calculates x3
for q=0.1:0.99
calculates x4
end
end
end
end
xtotal=x1*x2*x3*x4
I want to display all xtotal value, but the catch is I need i+j+k+q=1.
So for example i=.20,j=.25,k=.40,q=.15
TIA
The program is similar to the following:
for i=0.1:0.99
calculates x1
for j=0.1:0.99
calculates x2
for k=0.1:0.99
calculates x3
for q=0.1:0.99
calculates x4
end
end
end
end
xtotal=x1*x2*x3*x4
I want to display all xtotal value, but the catch is I need i+j+k+q=1.
So for example i=.20,j=.25,k=.40,q=.15
TIA