Info
Diese Frage ist geschlossen. Öffnen Sie sie erneut, um sie zu bearbeiten oder zu beantworten.
How to make the result of the sum of two vectors in its first element turn out to be 0
1 Ansicht (letzte 30 Tage)
Ältere Kommentare anzeigen
Hi. Good morning. I have two vectors A and B
A =
0 0.2880 0.5659 1.7225 2.3570 3.4754 4.5621 5.4822 5.8049 6.2209
B =
0.1000 0 0 0 -0.1000 0 0 0 0.1000 -0.1000
the sum of the two vectors would be: C =
0.1000 0.2880 0.5659 1.7225 2.2570 3.4754 4.5621 5.4822 5.9049 6.1209
What I do so that only the first element of the result in C gives me 0 ? like this
C =
0.0000 0.2880 0.5659 1.7225 2.2570 3.4754 4.5621 5.4822 5.9049 6.1209
4 Kommentare
Antworten (1)
Ameer Hamza
am 24 Apr. 2018
Matrix Indexing is a very basic concept in MATLAB. You can refer here for details https://www.mathworks.com/company/newsletters/articles/matrix-indexing-in-matlab.html. After adding C=A+B, set the first element to Zero as C(1)=0.
1 Kommentar
Diese Frage ist geschlossen.
Siehe auch
Produkte
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!