how to find maximum values of two numbers present in a structure
16 visualizzazioni (ultimi 30 giorni)
Mostra commenti meno recenti
Sivakumaran Chandrasekaran
il 21 Dic 2013
Commentato: Walter Roberson
il 21 Dic 2013
My code creates a structure with values {15 8}... i need to find the maximum of those two numbers.. how to do it
0 Commenti
Risposta accettata
Azzi Abdelmalek
il 21 Dic 2013
Modificato: Azzi Abdelmalek
il 21 Dic 2013
data=struct('a',{8 5}) % Example
out=max([data.a])
1 Commento
Walter Roberson
il 21 Dic 2013
The above is correct and is for a structure array in which the field "a" of each element has one or more values; the number of values along the rows can vary with the above code, but the number of rows must be consistent with that code.
Più risposte (0)
Vedere anche
Categorie
Scopri di più su Structures in Help Center e File Exchange
Prodotti
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!