Create array Arr with 5 rows and 4 columns with each element = 5
27 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
vArr = [ 5 6 7 8; 2 3 4 5 ; 2 3 4 5; 2 3 4 5; 2 3 4 5 ]
but what does it mean with each element = 5 all number has to be 5???
0 commentaires
Réponses (2)
James Tursa
le 26 Sep 2019
Modifié(e) : James Tursa
le 26 Sep 2019
Yes. Replace all of your numbers with 5 and you will have it. E.g.,
Arr = [5 5 5 5; etc.
This is the hardest way to accomplish the result, but it does work.
0 commentaires
raghav
le 24 Fév 2024
CODE TO CREATE ARRAY OF ALL ELEMENTS OF 5 WITH 5 ROWS AND 4 COLUMNS
Arr=5*ones(5,4)
Voir également
Catégories
En savoir plus sur Data Type Conversion 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!