find the entries in a set of elements

Let A= [35,46, 78, 23, 5, 16, 81, 3, 35]
a, Which command is used to find the seventh entry of A.
b, Which command is used to find the sum of third and fifth entries of A.

Antworten (1)

Mundrathi Venugopal
Mundrathi Venugopal am 4 Feb. 2019

0 Stimmen

A = [35,46, 78, 23, 5, 16, 81, 3, 35];
a = A(7); % to find the seventh entry of A
b = sum(A([3 5])); % to find the sum of third and fifth entries of A

1 Kommentar

madhan ravi
madhan ravi am 4 Feb. 2019
It‘s obviously homework, don’t provide full solution give hints instead.

Melden Sie sich an, um zu kommentieren.

Kategorien

Mehr zu Get Started with MATLAB finden Sie in Hilfe-Center und File Exchange

Gefragt:

am 3 Feb. 2019

Kommentiert:

am 4 Feb. 2019

Community Treasure Hunt

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

Start Hunting!

Translated by