How to find minimum value within specific segments of a matrix using Vectorization?
古いコメントを表示
I have the following matrix:
A=[1 0.1; 1 0.15; 1 0.35; 1 0.22; 2 0.45; 2 0.69; 2 0.33;...600 0.27; 600 0.34; 600 0.22];
Here first column (numbers 1, 2...600) represents time and second column (numbers 0.1, 0.15,0.35 etc.) represents fuel consumption. I need to find the value of minimum fuel consumption for each time period( for time=1s there will be a single min value and so on for each time) and store it in another array. This is just a example and actual number of data points are very large and using of for loops is time consuming. How can I solve this problem using Vectorization method or without using any loops? Thanks in advance!
採用された回答
その他の回答 (0 件)
カテゴリ
ヘルプ センター および File Exchange で Aerospace Blockset についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!