Array of fixed length
Ältere Kommentare anzeigen
A user inputs a value n.
I want to make an array that has n values, 1/n.
If n=4, output would be
[1/4 1/4 1/4 1/4]
Not quite sure how to do this.
1 Kommentar
Walter Roberson
am 9 Dez. 2020
Hint: ones(), or repmat(), or repelem() .
Antworten (0)
Kategorien
Mehr zu Matrices and Arrays finden Sie in Hilfe-Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!