Loop counter help please

2 次查看(过去 30 天)
Reynaldo Ponce
Reynaldo Ponce 2019-2-26
回答: KSSV 2019-2-26
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)

回答(1 个)

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

类别

Help CenterFile Exchange 中查找有关 MATLAB 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by