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 8869153
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T17:25:00+00:00 2026-06-14T17:25:00+00:00

I have a 3 columns, n rows matrix: [ a,b,c; d,e,f; g,h,i; ] I

  • 0

I have a 3 columns, n rows matrix:

[ a,b,c;
  d,e,f;
  g,h,i; ]

I want to apply the norm function to each of the rows, and get a 1xn matrix containing the norms:

[ norm([a,b,c]);
  norm([d,e,f]);
  norm([g,h,i]); ]

I could do this with a for-loop, but is there a better way?

  • 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-06-14T17:25:02+00:00Added an answer on June 14, 2026 at 5:25 pm

    What about

     norms = sqrt(sum(A.^2,1))
    

    or

     norms = sqrt(sum(A.^2,2))?
    

    depending on whether your coordinates are in rows or in columns.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have two columns, each with many rows/divs. I'm trying to get jQuery UI
I have one column matrix with n rows. I want difference between row 2
I have a matrix of data (the columns represent time, and the rows spectrum
I want to show datagrid content (rows,columns) in XPS document.I have 20 columns. When
I have a data.matrix that is approximately 4000 rows and 100 columns. I am
I have a R object say: mat <- matrix(1:100,nrow=20) I want to send this
I have a very large matrix(10x55678) in numpy matrix format. the rows of this
I have a quadratic matrix(two-dimensional dynamic array of pointers) and need to change rows/columns
I have a large matrix, ~300 rows and 200000 cols. I want to shrink
I have a matrix with 12 rows and 77 columns, but to simply lets

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.