Post Reopened by Sjoerd C. de Vries, ybeltukov, Karsten 7., m_goldberg, RunnyKine
6 added 8 characters in body
source | link

I have a list of around 100 matrices, that looks like this

A={{{425060., 2.14235*10^6, 0.48, 0.01, 0.39, 0.49, 0.01, 0.38, 
 1.64, -1.65, -2.13, 518.}, {6.65048*10^6, 934695., 0.48, 0.39, 
 0.43, 0.49, 0.39, 0.44, 2.2, -0.72, 0.51, 226.}, {1.24808*10^6, 
 1.53025*10^6, 0.04, 0.07, 0.3, 0.04, 0.07, 0.31, -0.44, -0.52, 
 3.36, 370.}, {4.48215*10^6, 595558., ... }. 

So A[[2]], would bring in the 2nd matrix, A[[1,2]] would bring in the 2nd row of the 1st matrix and A[[1,2,2]] would bring in the 2nd element of the second row of the 1st matrix, in this case 934695.

I want to do the following:

  1. Remove columns 3,4,5 and 9 from all the matrices in the list.

  2. Add a column to each of the matrices whose elements are Sqrt of the sum of squares of the elements of column 6,7,8. In other words, columns 6,7,8, contains the x,y,z coordinates of a particle, and I want to calculate the distance of each particle from the origin (R). Note: I don't know how many rows are there in these matrices.

  3. Each matrix contains information of a collection of particles at different Redshift Z (time), I would like to make a BubbleChart of Z vs R as shown Redshift vs Distance for the data and plot them from Redshift 20 to 30 with a step of 0.1, the size of the bubbles are decided by the first column elements.

Redshift vs Distance

for the data and plot them from Redshift 20 to 30 with a step of 0.1, the size of the bubbles are decided by the first column elements.

I should note that, I have accomplished all these steps for a single matrix, however since I have around 100 of them, doing for each matrix is not the smartest way.

I lack the understanding of how to apply Map on to a list with complicated commands.

Thanks to @Gregory Rut and @RunnyKine I was able to discard the 2nd row of each matrix with element < 10^6.

I have a list of around 100 matrices, that looks like this

A={{{425060., 2.14235*10^6, 0.48, 0.01, 0.39, 0.49, 0.01, 0.38, 
 1.64, -1.65, -2.13, 518.}, {6.65048*10^6, 934695., 0.48, 0.39, 
 0.43, 0.49, 0.39, 0.44, 2.2, -0.72, 0.51, 226.}, {1.24808*10^6, 
 1.53025*10^6, 0.04, 0.07, 0.3, 0.04, 0.07, 0.31, -0.44, -0.52, 
 3.36, 370.}, {4.48215*10^6, 595558., ... }. 

So A[[2]], would bring in the 2nd matrix, A[[1,2]] would bring in the 2nd row of the 1st matrix and A[[1,2,2]] would bring in the 2nd element of the second row of the 1st matrix, in this case 934695.

I want to do the following:

  1. Remove columns 3,4,5 and 9 from all the matrices in the list.

  2. Add a column to each of the matrices whose elements are Sqrt of the sum of squares of the elements of column 6,7,8. In other words, columns 6,7,8, contains the x,y,z coordinates of a particle, and I want to calculate the distance of each particle from the origin (R). Note: I don't know how many rows are there in these matrices.

  3. Each matrix contains information of a collection of particles at different Redshift Z (time), I would like to make a BubbleChart of Z vs R as shown Redshift vs Distance for the data and plot them from Redshift 20 to 30 with a step of 0.1, the size of the bubbles are decided by the first column elements.

I should note that, I have accomplished all these steps for a single matrix, however since I have around 100 of them, doing for each matrix is not the smartest way.

I lack the understanding of how to apply Map on to a list with complicated commands.

Thanks to @Gregory Rut and @RunnyKine I was able to discard the 2nd row of each matrix with element < 10^6.

I have a list of around 100 matrices, that looks like this

A={{{425060., 2.14235*10^6, 0.48, 0.01, 0.39, 0.49, 0.01, 0.38, 
 1.64, -1.65, -2.13, 518.}, {6.65048*10^6, 934695., 0.48, 0.39, 
 0.43, 0.49, 0.39, 0.44, 2.2, -0.72, 0.51, 226.}, {1.24808*10^6, 
 1.53025*10^6, 0.04, 0.07, 0.3, 0.04, 0.07, 0.31, -0.44, -0.52, 
 3.36, 370.}, {4.48215*10^6, 595558., ... }. 

So A[[2]], would bring in the 2nd matrix, A[[1,2]] would bring in the 2nd row of the 1st matrix and A[[1,2,2]] would bring in the 2nd element of the second row of the 1st matrix, in this case 934695.

I want to do the following:

  1. Remove columns 3,4,5 and 9 from all the matrices in the list.

  2. Add a column to each of the matrices whose elements are Sqrt of the sum of squares of the elements of column 6,7,8. In other words, columns 6,7,8, contains the x,y,z coordinates of a particle, and I want to calculate the distance of each particle from the origin (R). Note: I don't know how many rows are there in these matrices.

  3. Each matrix contains information of a collection of particles at different Redshift Z (time), I would like to make a BubbleChart of Z vs R as shown

Redshift vs Distance

for the data and plot them from Redshift 20 to 30 with a step of 0.1, the size of the bubbles are decided by the first column elements.

I should note that, I have accomplished all these steps for a single matrix, however since I have around 100 of them, doing for each matrix is not the smartest way.

I lack the understanding of how to apply Map on to a list with complicated commands.

Thanks to @Gregory Rut and @RunnyKine I was able to discard the 2nd row of each matrix with element < 10^6.

5 added 1 character in body
source | link

I have a list of around 100 matrices, that looklooks like this

A={{{425060., 2.14235*10^6, 0.48, 0.01, 0.39, 0.49, 0.01, 0.38, 
 1.64, -1.65, -2.13, 518.}, {6.65048*10^6, 934695., 0.48, 0.39, 
 0.43, 0.49, 0.39, 0.44, 2.2, -0.72, 0.51, 226.}, {1.24808*10^6, 
 1.53025*10^6, 0.04, 0.07, 0.3, 0.04, 0.07, 0.31, -0.44, -0.52, 
 3.36, 370.}, {4.48215*10^6, 595558., ... }. 

So A[[2]], would bring in the 2nd matrix, A[[1,2]] would bring in the 2nd row of the 1st matrix and A[[1,2,2]] would bring in the 2nd element of the second row of the 1st matrix, in this case 934695.

I want to do the following:

  1. Remove columns 3,4,5 and 9 from all the matrices in the list.

  2. Add a column to each of the matrices whose elements are Sqrt of the sum of squares of the elements of column 6,7,8. In other words, columns 6,7,8, contains the x,y,z coordinates of a particle, and I want to calculate the distance of each particle from the origin (R). Note: I don't know how many rows are there in these matrices.

  3. Each matrix contains information of a collection of particles at different Redshift Z (time), I would like to make a BubbleChart of Z vs R as shown Redshift vs Distance for the data and plot them from Redshift 20 to 30 with a step of 0.1, the size of the bubbles are decided by the first column elements.

I should note that, I have accomplished all these steps for a single matrix, however since I have around 100 of them, doing for each matrix is not the smartest way.

I lack the understanding of how to apply Map on to a list with complicated commands.

Thanks to @Gregory Rut and @RunnyKine I was able to discard the 2nd row of each matrix with element < 10^6.

I have a list of around 100 matrices, that look like this

A={{{425060., 2.14235*10^6, 0.48, 0.01, 0.39, 0.49, 0.01, 0.38, 
 1.64, -1.65, -2.13, 518.}, {6.65048*10^6, 934695., 0.48, 0.39, 
 0.43, 0.49, 0.39, 0.44, 2.2, -0.72, 0.51, 226.}, {1.24808*10^6, 
 1.53025*10^6, 0.04, 0.07, 0.3, 0.04, 0.07, 0.31, -0.44, -0.52, 
 3.36, 370.}, {4.48215*10^6, 595558., ... }. 

So A[[2]], would bring in the 2nd matrix, A[[1,2]] would bring in the 2nd row of the 1st matrix and A[[1,2,2]] would bring in the 2nd element of the second row of the 1st matrix, in this case 934695.

I want to do the following:

  1. Remove columns 3,4,5 and 9 from all the matrices in the list.

  2. Add a column to each of the matrices whose elements are Sqrt of the sum of squares of the elements of column 6,7,8. In other words, columns 6,7,8, contains the x,y,z coordinates of a particle, and I want to calculate the distance of each particle from the origin (R). Note: I don't know how many rows are there in these matrices.

  3. Each matrix contains information of a collection of particles at different Redshift Z (time), I would like to make a BubbleChart of Z vs R as shown Redshift vs Distance for the data and plot them from Redshift 20 to 30 with a step of 0.1, the size of the bubbles are decided by the first column elements.

I should note that, I have accomplished all these steps for a single matrix, however since I have around 100 of them, doing for each matrix is not the smartest way.

I lack the understanding of how to apply Map on to a list with complicated commands.

Thanks to @Gregory Rut and @RunnyKine I was able to discard the 2nd row of each matrix with element < 10^6.

I have a list of around 100 matrices, that looks like this

A={{{425060., 2.14235*10^6, 0.48, 0.01, 0.39, 0.49, 0.01, 0.38, 
 1.64, -1.65, -2.13, 518.}, {6.65048*10^6, 934695., 0.48, 0.39, 
 0.43, 0.49, 0.39, 0.44, 2.2, -0.72, 0.51, 226.}, {1.24808*10^6, 
 1.53025*10^6, 0.04, 0.07, 0.3, 0.04, 0.07, 0.31, -0.44, -0.52, 
 3.36, 370.}, {4.48215*10^6, 595558., ... }. 

So A[[2]], would bring in the 2nd matrix, A[[1,2]] would bring in the 2nd row of the 1st matrix and A[[1,2,2]] would bring in the 2nd element of the second row of the 1st matrix, in this case 934695.

I want to do the following:

  1. Remove columns 3,4,5 and 9 from all the matrices in the list.

  2. Add a column to each of the matrices whose elements are Sqrt of the sum of squares of the elements of column 6,7,8. In other words, columns 6,7,8, contains the x,y,z coordinates of a particle, and I want to calculate the distance of each particle from the origin (R). Note: I don't know how many rows are there in these matrices.

  3. Each matrix contains information of a collection of particles at different Redshift Z (time), I would like to make a BubbleChart of Z vs R as shown Redshift vs Distance for the data and plot them from Redshift 20 to 30 with a step of 0.1, the size of the bubbles are decided by the first column elements.

I should note that, I have accomplished all these steps for a single matrix, however since I have around 100 of them, doing for each matrix is not the smartest way.

I lack the understanding of how to apply Map on to a list with complicated commands.

Thanks to @Gregory Rut and @RunnyKine I was able to discard the 2nd row of each matrix with element < 10^6.

4 added 16 characters in body
source | link

I have a list of around 100 matrices, that look like this

A={{{425060., 2.14235*10^6, 0.48, 0.01, 0.39, 0.49, 0.01, 0.38, 1.64, -1.65, -2.13, 518.}, {6.65048*10^6, 934695., 0.48, 0.39, 0.43, 0.49, 0.39, 0.44, 2.2, -0.72, 0.51, 226.}, {1.24808*10^6, 1.53025*10^6, 0.04, 0.07, 0.3, 0.04, 0.07, 0.31, -0.44, -0.52, 3.36, 370.}, {4.48215*10^6, 595558., ... }.

A={{{425060., 2.14235*10^6, 0.48, 0.01, 0.39, 0.49, 0.01, 0.38, 
 1.64, -1.65, -2.13, 518.}, {6.65048*10^6, 934695., 0.48, 0.39, 
 0.43, 0.49, 0.39, 0.44, 2.2, -0.72, 0.51, 226.}, {1.24808*10^6, 
 1.53025*10^6, 0.04, 0.07, 0.3, 0.04, 0.07, 0.31, -0.44, -0.52, 
 3.36, 370.}, {4.48215*10^6, 595558., ... }. 

So A[[2]]A[[2]], would bring in the 2nd matrix, A[[1,2]]A[[1,2]] would bring in the 2nd row of the 1st matrix and A[[1,2,2]]A[[1,2,2]] would bring in the 2nd element of the second row of the 1st matrix, in this case 934695.

I want to do the following:

  1. Remove columns 3,4,5 and 9 from all the matrices in the list.

  2. Add a column to each of the matrices whose elements are Sqrt of the sum of squares of the elements of column 6,7,8. In other words, columns 6,7,8, contains the x,y,z coordinates of a particle, and I want to calculate the distance of each particle from the origin (R). Note: I don't know how many rows are there in these matrices.

  3. Each matrix contains information of a collection of particles at different Redshift Z (time), I would like to make a BubbleChart of Z vs R as shown Redshift vs Distance for the data and plot them from Redshift 20 to 30 with a step of 0.1, the size of the bubbles are decided by the first column elements.

I should note that, I have accomplished all these steps for a single matrix, however since I have around 100 of them, doing for each matrix is not the smartest way.

I lack the understanding of how to apply Map on to a list with complicated commands.

Thanks to @Gregory Rut and @RunnyKine I was able to discard the 2nd row of each matrix with element < 10^6.

I have a list of around 100 matrices, that look like this

A={{{425060., 2.14235*10^6, 0.48, 0.01, 0.39, 0.49, 0.01, 0.38, 1.64, -1.65, -2.13, 518.}, {6.65048*10^6, 934695., 0.48, 0.39, 0.43, 0.49, 0.39, 0.44, 2.2, -0.72, 0.51, 226.}, {1.24808*10^6, 1.53025*10^6, 0.04, 0.07, 0.3, 0.04, 0.07, 0.31, -0.44, -0.52, 3.36, 370.}, {4.48215*10^6, 595558., ... }.

So A[[2]], would bring in the 2nd matrix, A[[1,2]] would bring in the 2nd row of the 1st matrix and A[[1,2,2]] would bring in the 2nd element of the second row of the 1st matrix, in this case 934695.

I want to do the following:

  1. Remove columns 3,4,5 and 9 from all the matrices in the list.

  2. Add a column to each of the matrices whose elements are Sqrt of the sum of squares of the elements of column 6,7,8. In other words, columns 6,7,8, contains the x,y,z coordinates of a particle, and I want to calculate the distance of each particle from the origin (R). Note: I don't know how many rows are there in these matrices.

  3. Each matrix contains information of a collection of particles at different Redshift Z (time), I would like to make a BubbleChart of Z vs R as shown Redshift vs Distance for the data and plot them from Redshift 20 to 30 with a step of 0.1, the size of the bubbles are decided by the first column elements.

I should note that, I have accomplished all these steps for a single matrix, however since I have around 100 of them, doing for each matrix is not the smartest way.

I lack the understanding of how to apply Map on to a list with complicated commands.

Thanks to @Gregory Rut and @RunnyKine I was able to discard the 2nd row of each matrix with element < 10^6.

I have a list of around 100 matrices, that look like this

A={{{425060., 2.14235*10^6, 0.48, 0.01, 0.39, 0.49, 0.01, 0.38, 
 1.64, -1.65, -2.13, 518.}, {6.65048*10^6, 934695., 0.48, 0.39, 
 0.43, 0.49, 0.39, 0.44, 2.2, -0.72, 0.51, 226.}, {1.24808*10^6, 
 1.53025*10^6, 0.04, 0.07, 0.3, 0.04, 0.07, 0.31, -0.44, -0.52, 
 3.36, 370.}, {4.48215*10^6, 595558., ... }. 

So A[[2]], would bring in the 2nd matrix, A[[1,2]] would bring in the 2nd row of the 1st matrix and A[[1,2,2]] would bring in the 2nd element of the second row of the 1st matrix, in this case 934695.

I want to do the following:

  1. Remove columns 3,4,5 and 9 from all the matrices in the list.

  2. Add a column to each of the matrices whose elements are Sqrt of the sum of squares of the elements of column 6,7,8. In other words, columns 6,7,8, contains the x,y,z coordinates of a particle, and I want to calculate the distance of each particle from the origin (R). Note: I don't know how many rows are there in these matrices.

  3. Each matrix contains information of a collection of particles at different Redshift Z (time), I would like to make a BubbleChart of Z vs R as shown Redshift vs Distance for the data and plot them from Redshift 20 to 30 with a step of 0.1, the size of the bubbles are decided by the first column elements.

I should note that, I have accomplished all these steps for a single matrix, however since I have around 100 of them, doing for each matrix is not the smartest way.

I lack the understanding of how to apply Map on to a list with complicated commands.

Thanks to @Gregory Rut and @RunnyKine I was able to discard the 2nd row of each matrix with element < 10^6.

3 added 994 characters in body
source | link
    Post Closed as "off-topic" by Yves Klett, bobthechemist, RunnyKine, kale, Öskå
2 added 164 characters in body
source | link
1
source | link