0 Daumen
1,2k Aufrufe

Hallo!

Ich soll in Matlab die Vektoriteration implementieren. Jetzt habe ich im Code sowas wie y^{k-1} gegeben, wobei y ein Vektor ist und k meine Laufvariable. Wie stelle ich sowas im Code dar ?

Eine Zeile sieht zB wie folgt aus:

$$ {y_s}^{k} = A * {y}^{k-1} $$ [A Matrix, y Vektor, y_s sollte eigentlich ein y Tilde sein]

Avatar von

1 Antwort

+1 Daumen
colon, :
Vector creation, array subscripting, and for-loop iterationcollapse all in page
The colon is one of the most useful operators in MATLAB®. It can create vectors, subscript arrays, and specify for iterations.

Syntax
x = j:k
x = j:i:k
A(:,n)
A(m,:)
A(:)
A(j:k)


Vgl. https://de.mathworks.com/help/matlab/ref/colon.html

Avatar von

Ein anderes Problem?

Stell deine Frage

Ähnliche Fragen

Willkommen bei der Stacklounge! Stell deine Frage einfach und kostenlos

x
Made by a lovely community