How to find the difference between two vectors
Show older comments
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 Comments
Image Analyst
on 12 Oct 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
on 12 Oct 2022
vani
on 13 Oct 2022
Accepted Answer
More Answers (0)
Categories
Find more on 2-D and 3-D Plots in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!