how do i get the last points of every 100 points from a 1000 point graph
조회 수: 7 (최근 30일)
이전 댓글 표시
x=0:1000
y=sin(x)
for N=0:100:length(x)
if N>N-50
N
end
end
this is what i have and i know its not right so please help
댓글 수: 4
Image Analyst
2018년 7월 6일
Huh? Is Carlos deleting his responses? All I see is this:
"how do i get the last points of every 100 points from a 1000 point graph"
x=0:1000
y=sin(x)
for N=0:100:length(x)
if N>N-50
N
end
end
Which is very confusing in itself.
채택된 답변
per isakson
2018년 7월 6일
편집: per isakson
2018년 7월 6일
"how do i get the last points of every [sequence of] 100 points from a [sequence of] 1000 point[s]" That's my interpretation of your question.
What about
>> x((100:100:1000))
ans =
99 199 299 399 499 599 699 799 899 999
>> y((100:100:1000))
ans =
-0.9992 -0.8818 -0.5216 -0.0177 0.4910 0.8645 1.0000 0.8601 0.4834 -0.0265
>>
Notice
>> length(x)
ans =
1001
추가 답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Directed Graphs에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!