Create a vector in Matlab
    5 visualizzazioni (ultimi 30 giorni)
  
       Mostra commenti meno recenti
    
Hi
I have a question. I've a number in one variable called x, for example, 0.9. I need to create a vector in Matlab with 2500 positions and, in the positions 250 to 360, to copy that number and the rest of the numbers, with 0. How can I code it?
It's something like this:
 0
 0
 0
 0
 0
 0
 0
 0.9 (in the position 250)
 0.9
 0.9
 ...
 0.9 (in the position 360)
 0
 0
 0
 0 (since 2500)
0 Commenti
Risposta accettata
Più risposte (1)
Vedere anche
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!


