how do i get the last points of every 100 points from a 1000 point graph
7 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Carlos Nunez
am 6 Jul. 2018
Bearbeitet: per isakson
am 6 Jul. 2018
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 Kommentare
Image Analyst
am 6 Jul. 2018
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.
Akzeptierte Antwort
per isakson
am 6 Jul. 2018
Bearbeitet: per isakson
am 6 Jul. 2018
"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
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Directed Graphs finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!