필터 지우기
필터 지우기

How to get variance vector from i to end of the vector X

조회 수: 1 (최근 30일)
Hakan Sagir
Hakan Sagir 2020년 12월 15일
답변: Cris LaPierre 2020년 12월 15일
Q = [ 1 2 3 4 5 6 7 8 9 ]
v1= var(Q)
v2 = var(Q([2:end]))
v3 = var(Q([3:end]))
....
I have to many variables like this.
I need to create a series but I don't know how?
I need new vector of Vnew [ v1, v2, v3, ..... vend]

채택된 답변

Cris LaPierre
Cris LaPierre 2020년 12월 15일
Looks like a job for a for loop.
See Ch 13 of MATLAB Onramp.
You can also find some examples in the documentation page of for.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Correlation and Convolution에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by