Make a vector for given number.

3 vues (au cours des 30 derniers jours)
fyza affandi
fyza affandi le 25 Nov 2018
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

Réponses (1)

Image Analyst
Image Analyst le 25 Nov 2018
Try this
vec = [vec, 9];
Adapt for different vector names.

Catégories

En savoir plus sur Multidimensional Arrays dans Help Center et File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by