Make a vector for given number.

1 次查看(过去 30 天)
fyza affandi
fyza affandi 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