Info

This question is closed. Reopen it to edit or answer.

Hi i've a question on looping and printing.

1 view (last 30 days)
Jagadesh Rao
Jagadesh Rao on 31 Oct 2014
Closed: MATLAB Answer Bot on 20 Aug 2021
if i have Nx=1 (Nx can be any number)
and T_H=([2 3;4 5;6 7;8 9]-Nx). T_H is a X*2 matrix and it could have any values. i mean number rows may change but only 2 columns.
i want the Nx be regularly increasing in a loop, and every element of T_H will reach "1" and go below that. I want to save Nx values under a variables each time any element of T_H becomes 1.
Please help. any help will be appreciated.
if you don't understand the question, ask me.
Thanks Jagadesh Rao Thalur
  1 Comment
Matt Tearle
Matt Tearle on 31 Oct 2014
It's not clear to me what you want to happen with the values that are 1 or lower. Perhaps an example or two will help? If Nx = 1, then only T_H(1,1) is 1 or lower; if Nx = 3, then T_H(1,1), T_H(1,2), and T_H(2,1) all meet the criterion. What do you want to happen in those two cases? Do you want to know how many values meet the criterion (1 and 3, in the above example)? Do you want to know the indices? Modify those values of T_H...?

Answers (0)

Community Treasure Hunt

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

Start Hunting!