please help me identufy this.. i write the program but i dont know what this program do.. this is the command.. and output..
이전 댓글 표시
this is the command
x= [-2 4 7 -9 3 11 7 5 7 ]
[i j ]= size (x)
count = 0 ;
for a = 1 : j
if x (1,a)==7
count=count+1 ;
end
end
count
and this is the output
x =
-2 4 7 -9 3 11 7 5 7
i =
1
j =
9
count =
3
x =
-2 4 7 -9 3 11 7 5 7
i =
1
j =
9
count =
3
please help me to identify this program.. thanks
댓글 수: 2
Swarooph
2012년 2월 9일
It is just counting the number of '7's in the first row of the variable 'x'. What would you LIKE it to do?
Sean de Wolski
2012년 2월 9일
So you wrote it but you don't know what it does? That is a very odd work flow from an engineering standpoint.
채택된 답변
추가 답변 (0개)
카테고리
도움말 센터 및 File Exchange에서 Operators and Elementary Operations에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!