To find variable storing max and min value
1 次查看(过去 30 天)
显示 更早的评论
I have three variables say a=1 b=2 c=3 i want to find the variable storing minimum and maximum value so how to write the matlab code in matlab function block
1 个评论
Adam
2020-2-26
If the values are comparable enough for min and max across them to mean something then you should put them all in a single array, then simply return the indices into that array with
[~, idxMin] = min( myArray );
[~, idxMax] = max( myarray );
回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Startup and Shutdown 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!