accessing data in vectors

fter creating the following vector, t, which of the following syntaxes will result in an error? Select all that apply.
t = [10 15 20 25 30 35];
t([1 4:5 6])
t([1 6 4])
t([1 .5 4])
t(10) = 13
t(2:4)
t(2 3 4)

1 件のコメント

Geoff Hayes
Geoff Hayes 2021 年 5 月 21 日
Themba - this seems like homework. What happens when you try running the code? Which ones result in errors? Please see array indexing for details.

回答 (1 件)

Jan
Jan 2021 年 5 月 21 日
編集済み: Jan 2021 年 5 月 21 日

0 投票

You can insert the lines in the code sections by clicking in the title bar for formatting on the icon for the code style. If you press the green triangle, you will see, if this fails.
So, Themba Mahlangu, please try to solve this homework question by your own and let the interface of the forum help you.
A hint: 2 lines will fail.

この質問は閉じられています。

質問済み:

2021 年 5 月 21 日

閉鎖済み:

2021 年 5 月 21 日

Community Treasure Hunt

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

Start Hunting!

Translated by