Error when trying to modify a code (vectors)
古いコメントを表示
採用された回答
その他の回答 (2 件)
Steven Lord
2019 年 11 月 16 日
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
カテゴリ
ヘルプ センター および File Exchange で Work with Components についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!