Need help calculating slope in X and Y directions from matrix data
2 views (last 30 days)
Show older comments
Need to determine max slope in a matrix of Z data for a given range of data points. For example i'd like to take the slope of (1-10) data points in row (1), then (2-11), thenm repeat for Row (2, 3, 4, ...) and so on for both rows and columns and output the MAX Row (X) slope and Max Column (Y) slope. Struggling on how to set it up like a moving average though. Any help would be greatly appreciated.
1 Comment
Image Analyst
on 3 Dec 2018
Please attach your Z matrix. It's not clear (to me at least) in your matrix, what are the x and what are the y. For a given row, are the x the column numbers and the y values the Z values of the elements in that row? Are your columns a perfect multiple of 10 and you want to move along in jumps of 10 (e.g. 1-10, 11-20, 21030, etc.), or can there be any number of columns and you want to move a window of width 10 along in "jumps" of one column at a time (e.g. 1-10, 2-11, 3-12, etc.)?
Answers (1)
See Also
Categories
Find more on Logical 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!