필터 지우기
필터 지우기

use of loop with matrix

조회 수: 1 (최근 30일)
Fiboehh
Fiboehh 2011년 5월 7일
Hellow i'm freaking out of matlab :p matrix D = [1 7 8 12 14 15] i want to use every value of the matrix in a loop. So the loop goes for 6 times (D has 6 elements) and the value of d is the value of the elements.
i have:
for d=1:D(end)
if d>10
% now various calculations with d , in this example 12 14 and 15
please help

채택된 답변

Walter Roberson
Walter Roberson 2011년 5월 7일
for d=D
if d>10
%whatever
end
end

추가 답변 (1개)

Fiboehh
Fiboehh 2011년 5월 7일
super! it works, hero :D

카테고리

Help CenterFile Exchange에서 Loops and Conditional Statements에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by