How to find the difference between two vectors
Mostrar comentarios más antiguos
Hello all,
My doubt is,
I have to find the difference between two vectors( for eg: y(8) and y(4) or y(6) and y(2)) and have to append the difference output also get the appended output in plot. So could anyone please tell me how to do these functions?.
y_try=[0 1e-9 0 0 0 1e-9 0 0] in this
y(1) =[0] ; y(2) = [1e-9] ; y(3) =[0] ; y(4) =[0]
y(5) =[0]; y(6) = [1e-9]; y(7) = [0] ; y(8) = [0]
3 comentarios
Image Analyst
el 12 de Oct. de 2022
Do you mean like
diffy = y(8) - y(4)
diffy = y(6) - y(2)
diffy = y(someIndex) - y(someIndex - 4)
Then you want to append the difference to what?
vani
el 12 de Oct. de 2022
vani
el 13 de Oct. de 2022
Respuesta aceptada
Más respuestas (0)
Categorías
Más información sobre Functions en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
