Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6546429
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T11:42:25+00:00 2026-05-25T11:42:25+00:00

Please consider: daList = {{{21, 18}, {20, 18}, {18, 17}, {20, 15}}, {{21, 18},

  • 0

Please consider:

daList = {{{21, 18}, {20, 18}, {18, 17}, {20, 15}}, 
          {{21, 18}, {20, 18}, {21, 14}, {21, 14}}};

I would like to compute the distance between each point in the 2 sub-lists of that list:

Yet I need to use a Function to apply at the correct level:

Function[seqNo, 
         EuclideanDistance[#, {0, 0}] & /@ daList[[seqNo]]] /@ 
         Range[Length@daList]

out = {{3 Sqrt[85], 2 Sqrt[181], Sqrt[613], 25}, {3 Sqrt[85], 2 Sqrt[181], 
        7 Sqrt[13], 7 Sqrt[13]}}

Is there a way to avoid this heavy function there?
To specify the level avoiding my Function with seqNo as argument? :

EuclideanDistance[#, {0, 0}] & /@ daList

out={EuclideanDistance[{{21, 18}, {20, 18}, {18, 17}, {20, 15}}, {0, 0}], 
     EuclideanDistance[{{21, 18}, {20, 18}, {21, 14}, {21, 14}}, {0, 0}]}
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-25T11:42:25+00:00Added an answer on May 25, 2026 at 11:42 am

    Have you tried the Level specification in Map?

    Map[EuclideanDistance[#, {0, 0}] &, daList, {2}]
    

    gives

    {{3 Sqrt[85],2 Sqrt[181],Sqrt[613],25},{3 Sqrt[85],2 Sqrt[181],7 Sqrt[13],7 Sqrt[13]}}
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Please consider this site . I'm having trouble stretching the submenu list items in
Please consider the following function body: var isValidated = true; $(selector1).each(function(){ //do validation with
Please consider : dalist = {{1, 1, 1}, {2, 2, 2}, {3, 3, 3},
please consider this scenario: I have a list of a class with about 50
Please consider the table bd.nn that contains roughly 19 million records: > SELECT n,
Please consider this C++ code for creation and traversing a linked list (number of
Please consider: dalist={{1, 2, 3, 4, 5, 6, 7, 8, 9, 10}, {2.88`, 2.04`,
Please consider : dalist = Transpose@{{Noise1,1,1,1,1,1},{Blah, 1, 2, 3, 4, 5}, {Noise2,2,2,2,2,2}, {COGCondition, 1,
Please consider : dalist = {{9, 6}, {5, 6}, {6, 0}, {0, 5}, {10,
Please consider this scenario: a web app that has 4 levels of access: admin

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.