Putting different outputs in one vector matrix
1 visualización (últimos 30 días)
Mostrar comentarios más antiguos
Hassanean
el 17 de Mzo. de 2017
Comentada: Hassanean
el 17 de Mzo. de 2017
Hi Please could anyone have information about how can collect the many separate outputs in the one matrix where these outputs are results from running one equation for several times in matlab.
For example:
x= (1 2 3 4 5 6 7 8 9 ...............)
y=sinx-cosx
y1=? % for first value of x
y2=?? % for second value of x
.
.
.
.
y=????? % for last value of x
Required: collect all these output in one vector matrix [y1; y2; ....;yn]
regards,
Respuesta aceptada
James Tursa
el 17 de Mzo. de 2017
Is this what you want?
x = 1:9; % a vector with elements 1, 2, ..., 9
y = sin(x) - cos(x); % the vector result at each point of x
0 comentarios
Más respuestas (0)
Ver también
Categorías
Más información sobre Get Started with MATLAB en Help Center y File Exchange.
Productos
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!