Error when trying to modify a code (vectors)
Ältere Kommentare anzeigen
Akzeptierte Antwort
Weitere Antworten (2)
Jenny Andersen
am 16 Nov. 2019
0 Stimmen
Steven Lord
am 16 Nov. 2019
You can directly use the elements of a vector through indexing. You don't need to extract them into separate variables.
w = [1 4 9] % Sample
v = w(3) - w(2).^2 + w(1) % 9 - 4*4 + 1 = -6
Kategorien
Mehr zu Work with Components finden Sie in Hilfe-Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!