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!