How do I publish results with an input command?
Afficher commentaires plus anciens
When I publish my code, I get an error saying there is no value for n. This is correct,so I'm wondering if there is a way to publish while saying n =8. I'm trying to make a random number column vector nx1 then sort it by descending values.
here is my code:
n=input(' enter an integer:');
v=randn(n,1)
w=sort(v,'descend')
Réponse acceptée
Plus de réponses (1)
San N
le 16 Déc 2020
2 votes
IF I want to publish the outputs after getting an input from user, how can I do it ?
Catégories
En savoir plus sur Shifting and Sorting Matrices dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!