MATLAB Sum Y Values for Repeating X Values to Plot 0-Crossing Point

  • Thread starter Thread starter DariusZizys
  • Start date Start date
  • Tags Tags
    Plot Point Sum
Click For Summary
The discussion revolves around the need to sum Y values associated with repeating X values from multiple curves and then plot the results to visualize where the summed Y values cross the zero axis. The key suggestion is to use the accumarray function in MATLAB, which efficiently sums Y values for each unique X value. This approach will facilitate the creation of a bar plot to display the summed values, highlighting the intersections with the zero axis, which is crucial for analyzing the data.
DariusZizys
Messages
1
Reaction score
0
Hello guys,

Have an issue here.
I have a large array of numbers, X and Y values.These are coordinates of 9 curves on the same x-axis , so the X values are repeating (433 X values repeating 9 times), what I need to do is to sum Y values for each X value separately. and then plot it (bar plot would be great), I need to see at which place the sum ofY values cross he 0 axis ( the Y values are both possitive an negative).

Thanks in advance!
 
Physics news on Phys.org

Similar threads

  • · Replies 5 ·
Replies
5
Views
2K
  • · Replies 4 ·
Replies
4
Views
2K
  • · Replies 4 ·
Replies
4
Views
2K
  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 2 ·
Replies
2
Views
3K
  • · Replies 2 ·
Replies
2
Views
2K
  • · Replies 12 ·
Replies
12
Views
4K
  • · Replies 14 ·
Replies
14
Views
3K
  • · Replies 2 ·
Replies
2
Views
2K
  • · Replies 2 ·
Replies
2
Views
2K