How to make a NxM matrix with all the same value

Hey Guys,
So if I want to make a matrix measureing NxM all containing the same value, what's the most succinct way of doing that. I was thinking something like: ones(5,5)*200 to make a 5x5 matrix of 200s.

 채택된 답변

Dan
Dan 2012년 5월 17일

1 개 추천

That's how I would do it.

추가 답변 (0개)

카테고리

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

태그

질문:

2012년 5월 17일

Community Treasure Hunt

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

Start Hunting!

Translated by