Changing nth value of a vector?

Hello,
I have a vector of 500.000 values and I want to change, or update every 10th value of this vectore and wonder how to realize this? I was thinking about a for-loop, but it did not work out yet.
It would be great if someone could give me a hint how to implement this.

답변 (1개)

bym
bym 2011년 5월 14일

3 개 추천

X %vector of 500,000 values
X(1:10:500000)= newValue % assuming newValue is a constant

카테고리

도움말 센터File Exchange에서 MATLAB에 대해 자세히 알아보기

질문:

2011년 5월 14일

Community Treasure Hunt

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

Start Hunting!

Translated by