Running two loops at once

1 view (last 30 days)
matlabkid602
matlabkid602 on 17 Nov 2017
Commented: KSSV on 17 Nov 2017
Hi.
I have a problem where I need to run two index parameters at one time.
For example, I need p to go from 1:21, but I also need an index n to run from -10:10 for each value of p. So when p=1, n =-10 etc
How do I do this?
  1 Comment
KSSV
KSSV on 17 Nov 2017
What's the necessity to make a loop index negative?

Sign in to comment.

Answers (0)

Categories

Find more on Loops and Conditional Statements in Help Center and File Exchange

Tags

Products

Community Treasure Hunt

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

Start Hunting!