Make a vector for given number.

조회 수: 2 (최근 30일)
fyza affandi
fyza affandi 2018년 11월 25일
답변: Image Analyst 2018년 11월 25일
How can I make a vector for given number end with 9.
For example I want 5 elements.
A = [7 8 8 9 9]
For 4 elements
B=[8 8 9 9]
and so on.
Hope you can help me

답변 (1개)

Image Analyst
Image Analyst 2018년 11월 25일
Try this
vec = [vec, 9];
Adapt for different vector names.

카테고리

Help CenterFile Exchange에서 Multidimensional Arrays에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by