フィルターのクリア

how do i get the last points of every 100 points from a 1000 point graph

7 ビュー (過去 30 日間)
Carlos Nunez
Carlos Nunez 2018 年 7 月 6 日
編集済み: per isakson 2018 年 7 月 6 日
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 件のコメント
per isakson
per isakson 2018 年 7 月 6 日
Indeed, so what do you want?
Image Analyst
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
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 ExchangeDirected Graphs についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by