- Do you want floating point values or integer values? It is not clear from the text exactly what output you need: does "values" mean real or integer values?
- Are the values allowed to repeat, or with no repetitions? Or are you just looking for a random permutation?
- What random distribution do you need?
how can i make a single column matrix
3 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
hanish h
le 27 Mai 2015
Modifié(e) : Walter Roberson
le 27 Mai 2015
function [v] = int_col(n)
v = rand([n;-1;1]);
end
in command window
int_col(6)
Error using rand
Size vector should be a row vector with real elements.
Error in int_col (line 2)
v = rand([n;-1;1]);
i have no idea whats wrong in this program
i want to create a column matrix of column n values must be less than n and greater than 1
1 commentaire
Stephen23
le 27 Mai 2015
Modifié(e) : Stephen23
le 27 Mai 2015
Réponse acceptée
Plus de réponses (0)
Voir également
Catégories
En savoir plus sur Creating and Concatenating Matrices 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!