Discover MakerZone

MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi

Learn more

Discover what MATLAB® can do for your career.

Opportunities for recent engineering grads.

Apply Today

Thread Subject:
minimum of multiple values in multiple rows

Subject: minimum of multiple values in multiple rows

From: ben

Date: 13 Oct, 2010 18:36:04

Message: 1 of 6

Hi,

I have matrix A:

A =

     1 2 3 4
    67 68 69 70
     34 3 22 9

I'd like to know how can I find the minimum value of each row in A?

So that the following can be returned:

return =
              1
             67
              3

take care
ben

Subject: minimum of multiple values in multiple rows

From: Sean

Date: 13 Oct, 2010 18:48:03

Message: 2 of 6

"ben " <cloader41@gmail.com> wrote in message <i94u6k$hff$1@fred.mathworks.com>...
> Hi,
>
> I have matrix A:
>
> A =
>
> 1 2 3 4
> 67 68 69 70
> 34 3 22 9
>
> I'd like to know how can I find the minimum value of each row in A?
>
> So that the following can be returned:
>
> return =
> 1
> 67
> 3
>
> take care
> ben

A hint:
help min

Subject: minimum of multiple values in multiple rows

From: ben

Date: 13 Oct, 2010 19:28:04

Message: 3 of 6

I always get returned an error when i do:

 min(A,:)

help please

ben

Subject: minimum of multiple values in multiple rows

From: Matt J

Date: 13 Oct, 2010 19:58:03

Message: 4 of 6

"ben " <cloader41@gmail.com> wrote in message <i95184$a9k$1@fred.mathworks.com>...
> I always get returned an error when i do:
>
> min(A,:)
======

You clearly haven't read the help documentation on min(). It would not have told you to do this.

Subject: minimum of multiple values in multiple rows

From: ben

Date: 13 Oct, 2010 20:18:03

Message: 5 of 6

wow, you have magic crystal ball

Subject: minimum of multiple values in multiple rows

From: ben

Date: 13 Oct, 2010 20:20:04

Message: 6 of 6

but hey thanks....figured it out

ben

Tags for this Thread

What are tags?

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.

Contact us