MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi
Learn moreOpportunities for recent engineering grads.
Apply TodayNew to MATLAB?
MATLAB Central > MATLAB Newsreader > Find Minimum Values of Matrix without MIN or For l... 

Subject: Find Minimum Values of Matrix without MIN or For loops From: Stephen Smitherman Date: 1 May, 2011 02:39:04 Message: 1 of 11 
I am reviewing for a test and my teacher loves to ask us questions that require the removal of explicit loops (FOR and WHILE) and use implicit (Array Operations) instead. For example instead of 
Subject: Find Minimum Values of Matrix without MIN or For loops From: Roger Stafford Date: 1 May, 2011 03:24:04 Message: 2 of 11 
I don't think you can hope to eliminate both forloops within the spirit of your assignment. If you replace the "ifend" construct with the appropriate logical vectors, however, you could accomplish the task with a single forloop. End of hint. 
Subject: Find Minimum Values of Matrix without MIN or For loops From: m4 Chrennikov Date: 1 May, 2011 07:46:04 Message: 3 of 11 
If I get it clearly, you are searching the minimum element in each column? 
Subject: Find Minimum Values of Matrix without MIN or For loops From: m4 Chrennikov Date: 1 May, 2011 07:54:05 Message: 4 of 11 
oops :) 
Subject: Find Minimum Values of Matrix without MIN or For loops From: Nasser M. Abbasi Date: 1 May, 2011 08:02:20 Message: 5 of 11 
On 5/1/2011 12:46 AM, m4 Chrennikov wrote: 
Subject: Find Minimum Values of Matrix without MIN or For loops From: Srikanth Date: 1 May, 2011 18:34:44 Message: 6 of 11 
For the minimum of the entire matrix, do V=sort(A(:)). Then V(1) 
Subject: Find Minimum Values of Matrix without MIN or For loops From: Roger Stafford Date: 1 May, 2011 19:09:04 Message: 7 of 11 
"m4 Chrennikov" <abrek77@gmail.com> wrote in message <ipj3it$or2$1@fred.mathworks.com>... 
Subject: Find Minimum Values of Matrix without MIN or For loops From: John D'Errico Date: 1 May, 2011 19:39:05 Message: 8 of 11 
"Roger Stafford" wrote in message <ipkb4g$9uf$1@fred.mathworks.com>... 
Subject: Find Minimum Values of Matrix without MIN or For loops From: Adrien Leygue Date: 1 May, 2011 21:57:04 Message: 9 of 11 
Ok, here is a oneliner solution 
Subject: Find Minimum Values of Matrix without MIN or For loops From: Roger Stafford Date: 2 May, 2011 23:35:20 Message: 10 of 11 
"Adrien Leygue" wrote in message <ipkkvg$5ti$1@fred.mathworks.com>... 
Subject: Find Minimum Values of Matrix without MIN or For loops From: Adrien Leygue Date: 10 May, 2011 21:35:15 Message: 11 of 11 

No tags are associated with this thread.
A tag is like a keyword or category label associated with each thread. Tags make it easier for you to find threads of interest.
Anyone can tag a thread. Tags are public and visible to everyone.