Calculate diff between vectors and find Max
21 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
Hi Guys,I have three column matrices, I want to calculate their differences one by one and finally get the maximum value. The dimension of the matrix is 1024.Thanks to all
2 comentarios
dpb
el 24 de Mzo. de 2023
Unclear problem satement, show us a small example what you want to calculate.
However, the first step is going to be to put the three separate variables into one array (or at least a cell array) so can operate on them by row, column references instead of having to write explicit code or the ugly, error prone ways we won't even mention...
DGM
el 24 de Mzo. de 2023
The difference between what and what? If you're looking for the maximum difference, then order matters. ... or are you asking for the absolute difference?
Respuestas (1)
Swaraj
el 4 de Abr. de 2023
You can use the “diff” function to calculate the differences.
You can than use the “max” function to find the maximum out of the resulting vector.
Documentation of “diff”
Documentation of “max”
0 comentarios
Ver también
Categorías
Más información sobre Get Started with MATLAB en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!