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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T23:11:03+00:00 2026-06-09T23:11:03+00:00

Traverse matrix in a direction specified by azimuth. So I have a 2D matrix

  • 0

Traverse matrix in a direction specified by azimuth.

So I have a 2D matrix and an azimuth. What I want to do is traverse the matrix in that direction. From that azimuth I can derive a line equation.

Now I want to traverse the matrix in that direction of line. So in this case the 1st block I want to read info from is market as 1 then 2 and so on. (the values in the matrix right now are just to represent the order in which they are accessed)

https://i.stack.imgur.com/DPI9v.png

Let’s say if the line derived from azimuth goes as shown in the figure below then the matrix should be traverse from left to right.

https://i.stack.imgur.com/0D63q.png

If the problem is not clear please ask any question and I will explain further. Thanks for your time.

  • 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-09T23:11:05+00:00Added an answer on June 9, 2026 at 11:11 pm

    Label cell in row i column j by i * sin(a) + j * cos(a). Then traverse in ascending order of these labels.
    Assuming in your first example a = 45° and in the second a = 0°.

    So for your first example, sin(a) = cos(a) = sqrt(0.5). The calculated labels are the values in your figure multiplied by sqrt(2).

    For your second example, sin(a) = 0; cos(a) = 1 and you get the same values as in your figure.

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

Sidebar

Related Questions

I have a 2d matrix, i want to traverse all elements in this matrix
How can I traverse through this set of data? String[] from = new String[]{AppSQLite.KEY_NAME,AppSQLite.KEY_ICON};
Looking for how to traverse a JTree (can do that) and check to see
Typical strlen() traverse from first character till it finds \0 . This requires you
Let’s say I have table/list like this n=3 in this case, but n can
I can traverse the list of notifications by using FQL. Great. Now, how do
Is it possible to traverse a table like this: mysql> select * from `stackoverflow`.`Results`;
I want to traverse this array and display, 'comment' as bullet points. Array (
I want to traverse this array and display, in bulleted divs. I know this
If I want to traverse a quadtree, do the dimensions have to be only

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.