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

Walter Roberson
Walter Roberson 2020년 12월 9일
Hint: ones(), or repmat(), or repelem() .

댓글을 달려면 로그인하십시오.

답변 (0개)

카테고리

도움말 센터File Exchange에서 Matrices and Arrays에 대해 자세히 알아보기

질문:

2020년 12월 9일

댓글:

2020년 12월 9일

Community Treasure Hunt

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

Start Hunting!

Translated by