how can I find the maximum value of a parameter running within a loop
4 views (last 30 days)
Show older comments
Commented: R@SH on 16 Oct 2021
I want to extract the maximum of a parameter in aloop through its various ieterations, something like below:
How can I find the maximum of C and also display corresponding A and B?
I would appreciate your response in advance.
KSSV on 16 Oct 2021
maxC = 0 ;
if C > maxC
maxC = C ;
Amax = A ;
Bmax = B ;
[maxC Amax Bmax]
More Answers (0)
Find more on Specialized Power Systems 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!