Loop counter help please

1 visualizzazione (ultimi 30 giorni)
Reynaldo Ponce
Reynaldo Ponce il 26 Feb 2019
Risposto: KSSV il 26 Feb 2019
Using a FOR loop, perform the following manipulations suppress the output.
  • new_A = A + loop counter
  • new_B= B – loop counter
  • new_C= C * loop counter
  • new_D= D / loop counter
  • new_E= E (Does not need to be done inside the FOR loop)

Risposte (1)

KSSV
KSSV il 26 Feb 2019
Check the below pseudo code.
N = 10 ;
iwant = zeros(N,1) ;
for i = 1:N
iwant(i) = i ;
end

Categorie

Scopri di più su Line Plots in Help Center e File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by