Filter löschen
Filter löschen

Write a function that takes as input a vector x and uses a for loop to calculate the sum of the vector x. It should output the sum of the vector.

2 Ansichten (letzte 30 Tage)
I have no idea what to do and I'm not allowed to use built-in matlab functions

Antworten (1)

royed
royed am 7 Feb. 2020
In principle I shouldn't answer the question.
1) Define Array
2) for loop indexing the elements of the array till ir reaches the last element

Kategorien

Mehr zu Loops and Conditional Statements finden Sie in Help Center und File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by