syntax martix matlab answer

1 Let A = [0 2 0 4 5; 1 20 3 40 5; 10 200 30 40 50]
a) Write the MATLAB syntax to get the 8th element of A?
How do i write the matlab syntax for this question ?

回答 (2 件)

Stephan
Stephan 2018 年 9 月 1 日

0 投票

Hi Melissa,
sounds like homework. You find the answer here:
Best regards
Stephan
melissa tan
melissa tan 2018 年 9 月 1 日

0 投票

the 8th element the question is referring isit 3?

8 件のコメント

Stephan
Stephan 2018 年 9 月 1 日
?
melissa tan
melissa tan 2018 年 9 月 1 日
huh?
Walter Roberson
Walter Roberson 2018 年 9 月 1 日
Read about linear indexing.
Stephan
Stephan 2018 年 9 月 1 日
編集済み: Stephan 2018 年 9 月 1 日
Melissa - we do not do homework here for others. This also includes your homework. I gave you a link - read it. Then try it in Matlab and see what happens. If you get stuck by trying it - here is the right place to ask. But you have to show us that you have tried it.
melissa tan
melissa tan 2018 年 9 月 1 日
A=[0 2 0 4 5 ; 1 20 3 40 5 ;10 200 30 40 50]
A =
0 2 0 4 5
1 20 3 40 5
10 200 30 40 50
>> A(2,3)
ans =
3
is this correct?
Stephan
Stephan 2018 年 9 月 1 日
Yes
Image Analyst
Image Analyst 2018 年 9 月 1 日
Doesn't look like you read about linear indexing like Walter suggested. Did you look at A(8)?
Stephan
Stephan 2018 年 9 月 1 日
編集済み: Stephan 2018 年 9 月 1 日
Why are you so unconfident If you Type A (8) and get 3 as result. And you type A (2,3) and get 3 as result. Look at your matrix. How many 3 are there? What can you conclude from this? Read the link

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

タグ

質問済み:

2018 年 9 月 1 日

閉鎖済み:

2021 年 8 月 20 日

Community Treasure Hunt

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

Start Hunting!

Translated by