what does this line mean
Información
La pregunta está cerrada. Vuélvala a abrir para editarla o responderla.
Mostrar comentarios más antiguos
t= [ones(1,10) 1+ones(1,10) 2+ones(1,15) 3+ones(1,10) ];
1 comentario
Adam
el 26 de Feb. de 2020
doc ones
tells you what the ones function does.
Respuestas (1)
Benjamin Großmann
el 26 de Feb. de 2020
0 votos
ones(r, c) creates an array of ones with r rows and c columns. That said, ones(1, c) creates a line vector with c elements. Here, four line vectors are created and written side by side in one line vector. Therefore, t is a line vector containing 10 ones, 10 twos, 15 threes and 10 fours.
La pregunta está cerrada.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!