Get specific elment of result / solution vector
Infos
Cette question est clôturée. Rouvrir pour modifier ou répondre.
Afficher commentaires plus anciens
Hi, is there a way to get the last element of the result-vector of some calculation? E.g.: I want to solve a system of linear equations and get the last element of the solution. I could write
temp = A\b;
x = temp(end);
but I want to do that with only one line of code. I tried things like
x= [A\b](end);
but they didn't worked out...
Thanks!
Réponses (1)
Azzi Abdelmalek
le 6 Mai 2016
If you want it in one line
temp = A\b;x = temp(end);
Otherwise you can't do it
Cette question est clôturée.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!