Putting different outputs in one vector matrix
1 vue (au cours des 30 derniers jours)
Afficher commentaires plus anciens
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,
Réponse acceptée
James Tursa
le 17 Mar 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 commentaires
Plus de réponses (0)
Voir également
Catégories
En savoir plus sur Get Started with MATLAB dans Help Center et File Exchange
Produits
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!