Replacing the contents of a matrix
Afficher commentaires plus anciens
I have a 1 dimensional matrix (1000 x 1) that consists of numbers from 0 to 63.
I would like to replace the contents of this matrix as follows:
0 --> 0
1 --> 0.5
2 --> 1
3 --> 1.5
and so on..
Can someone please show me how to do this.
Thanks
Réponse acceptée
Plus de réponses (1)
Azzi Abdelmalek
le 30 Jan 2016
v=[0 1 2 3 4 5]'
out=v*0.5
Catégories
En savoir plus sur Multidimensional Arrays 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!