MATLAB: Minimum of a vector or array

matlab function

Hi, i am new to a matlab at all and have a question. so i had been given an excel file with a lot if data in it. so now i need to find minimum of a vector or array from each of the column but dont know how to do it ๐Ÿ™ if anybody can help me in explaining it step by step it would be much appreciated! thanks!

Best Answer

First, use the xlsread function to import the data, then then min function to find the minimum.
For example:
Data = xlsread('file_name.xls');
[ColMin,RowIdx] = min(Data);
This would import your data, then find the minimum value of the column and the row of the first instance of the occurrence of that value. (If you want to search for more than one instance of the minimum value, use the find function.)
NOTE โ€” This is obviously UNTESTED CODE. It should work but Iโ€™ve not tested it with your file.