Drexel dragonThe Math ForumDonate to the Math Forum



Search All of the Math Forum:

Views expressed in these public forums are not endorsed by Drexel University or The Math Forum.


Math Forum » Discussions » Software » comp.soft-sys.matlab

Topic: Return column index (easy question)
Replies: 3   Last Post: Feb 12, 2005 9:35 AM

Advanced Search

Back to Topic List Back to Topic List Jump to Tree View Jump to Tree View   Messages: [ Previous | Next ]
Tim

Posts: 29
Registered: 2/4/05
Re: Return column index (easy question)
Posted: Feb 12, 2005 9:35 AM
  Click to see the message monospaced in plain text Plain Text   Click to reply to this topic Reply

M,

Thanks so much -- pointed me in the right direction . . .

Tim

M wrote:
>
>
> try this:
>
> find(v==max(max(d)));
>
> /M
>
> Tim Booher wrote:

>>
>>
>> I am trying to return a maximum eigenvalue and its associated
>> eigenvector, but can't because I don't know how to find the

> column
>> number associated with the maximum eigenvalue. For example,
>>
>> [v d]=eig([1 2 3; 4 5 6; 7 8 9]);
>>
>> max_eig_val=max(max(d));
>> max_eig_vec=v(:,??);
>>
>> What can I put in for ??. ColumnIndex(max(max(d))) would be

great
>> if
>> it existed.
>>
>> Any ideas??
>>
>> Thanks so much,
>>
>> Tim




Point your RSS reader here for a feed of the latest messages in this topic.

[Privacy Policy] [Terms of Use]

© Drexel University 1994-2014. All Rights Reserved.
The Math Forum is a research and educational enterprise of the Drexel University School of Education.