problem in using if command

1 view (last 30 days)
Prakhar Modi
Prakhar Modi on 13 Jul 2019
Commented: Steven Lord on 14 Jul 2019
Hello everyone,
I have already calculated 25 values of X.
Now I am calculating next 10 values of X and I want to run a loop for that. Now when I am computing X(26) than I want to break the loop at the moment when the computed value of X(26) is having a difference of 1 with any of the already calculated 25 values of X. Now when I am calculating the next X(27) I want the same condition to follow as for X(26) but the code should not include that value of X from the already calculated 25 values of X which was used in calculating X(26).
  4 Comments
Steven Lord
Steven Lord on 14 Jul 2019
Can you take a step back and explain at a higher level your goal in generating this data? There may be a more efficient algorithm we can suggest if we get the full picture of what you want to achieve.

Sign in to comment.

Answers (0)

Products


Release

R2018a

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by