Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.soft-sys.math.mathematica > #11380

Re: working with nested lists

From Sseziwa Mukasa <mukasa@gmail.com>
Newsgroups comp.soft-sys.math.mathematica
Subject Re: working with nested lists
Date 2012-08-16 06:07 +0000
Message-ID <k0i2n9$1e2$1@smc.vnet.net> (permalink)
References <20120815073426.2CC1E684B@smc.vnet.net>
Organization Time-Warner Telecom

Show all headers | View raw


Map[{#[[1]],-#[[2]]/Sin[#[[1]]]}&,myList,{2}]

On Aug 15, 2012, at 3:34 AM, Levente wrote:

> I'm trying to apply a transformation to a every element in a nested list. The issue is that each sub-list has a different length
>
> Example of the list:
> myList={{{-33.355 Degree, 278.265}, {-33.486 Degree,
>  155.871}, {-60.650 Degree, 27.534}},
> {{-38.418 Degree, 148.054}, {-165.173 Degree, 70.342}}};
>
> This is what I am trying and does not work:
> Do[
> Table[{myList[[k, i, 1]], myList[k, i, 2]] (-1)/Sin[myList[[k, i, 1]]]}, {i,
>   Length[myList[[k]]]}], {k, Length[myList]}]
>
> Any tips?
>

Back to comp.soft-sys.math.mathematica | Previous | Next | Find similar | Unroll thread


Thread

Re: working with nested lists Sseziwa Mukasa <mukasa@gmail.com> - 2012-08-16 06:07 +0000

csiph-web