Mathematica 9 is now available
Student Support Forum
-----
Student Support Forum: 'dimensions' topicStudent Support Forum > General > Archives > "dimensions"

< Previous Comment | Next Comment >Help | Reply To Comment | Reply To Topic
Author Comment/Response
Bill Simpson
07/17/13 7:11pm

In Response To 'Re: dimensions'
---------
Perhaps

Use Take inside the For loop to extract elements 3,4,5,6 before doing the First, Last, Max, Min

or

Map[{First[Take[#,{3,6}]], Last[Take[#,{3,6}]], Max@@Take[#,{3,6}], Min@@Take[#,{3,6}]}&, Level[mat, {-2}]]

or

Map[{v=Take[#,{3,6}];First[v], Last[v], Max@@v, Min@@v}&, Level[mat, {-2}]]

or use pattern matching

mat/.{_String, _Integer, a_Real, b_Real, c_Real, d_Real, _Integer, _Integer} :> {a, d, Max[a,b,c,d], Min[a,b,c,d]}

or there are several other ways you could do this.

URL: ,

Subject (listing for 'dimensions')
Author Date Posted
dimensions augustus 07/10/13 12:14pm
Re: dimensions Bill Simpson 07/11/13 1:07pm
Re: dimensions augustus 07/17/13 12:23pm
Re: Re: dimensions Bill Simpson 07/17/13 7:11pm
Re: Re: Re: dimensions augustus 07/23/13 4:19pm
Re: Re: Re: Re: dimensions Bill Simpson 07/25/13 11:02am
< Previous Comment | Next Comment >Help | Reply To Comment | Reply To Topic