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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T01:23:16+00:00 2026-06-13T01:23:16+00:00

Statement of Problem: I have an array M with m rows and n columns.

  • 0

Statement of Problem:

  1. I have an array M with m rows and n columns. The array M is filled with non-zero elements.

  2. I also have a vector t with n elements, and a vector omega
    with m elements.

  3. The elements of t correspond to the columns of matrix M.

  4. The elements of omega correspond to the rows of matrix M.

Goal of Algorithm:

Define chi as the multiplication of vector t and omega. I need to obtain a 1D vector a, where each element of a is a function of chi.

Each element of chi is unique (i.e. every element is different).

Using mathematics notation, this can be expressed as a(chi)

Each element of vector a corresponds to an element or elements of M.

Matlab code:

Here is a code snippet showing how the vectors t and omega are generated. The matrix M is pre-existing.

[m,n] = size(M);
t = linspace(0,5,n);
omega = linspace(0,628,m);

Conceptual Diagram:

This appears to be a type of integration (if this is the right word for it) along constant chi.

Diagram

Reference:

Link to reference

The algorithm is not explicitly stated in the reference. I only wish that this algorithm was described in a manner reminiscent of computer science textbooks!

Looking at Figure 11.5, the matrix M is Figure 11.5(a). The goal is to find an algorithm to convert Figure 11.5(a) into 11.5(b).

It appears that the algorithm is a type of integration (averaging, perhaps?) along constant chi.

  • 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-13T01:23:17+00:00Added an answer on June 13, 2026 at 1:23 am

    The basic idea is to use two separate loops. The outer loop is over the chi variable values, whereas the inner loop is over the i variable values. Referring to the above diagram in the original question, the i variable corresponds to the x-axis (time), and the j variable corresponds to the y-axis (frequency). Assuming that the chi, i, and j variables can take on any real number, bilinear interpolation is then used to find an amplitude corresponding to an element in matrix M. The integration is just an averaging over elements of M.

    The following code snippet provides an overview of the basic algorithm to express elements of a matrix as a vector using the spectral collapsing from 2D to 1D. I can’t find any reference for this, but it is a solution that works for me.

    % Amp = amplitude vector corresponding to Figure 11.5(b) in book reference
    % M = matrix corresponding to the absolute value of the complex Gabor transform 
    % matrix in Figure 11.5(a) in book reference
    % Nchi = number of chi in chi vector
    % prod = product of timestep and frequency step
    % dt = time step
    % domega = frequency step
    % omega_max = maximum angular frequency
    % i = time array element along x-axis
    % j = frequency array element along y-axis
    % current_i = current time array element in loop
    % current_j = current frequency array element in loop
    % Nchi = number of chi
    % Nivar = number of i variables
    % ivar = i variable vector
    
    % calculate for chi = 0, which only occurs when
    % t = 0 and omega = 0, at i = 1
    av0 = mean( M(1,:) );           
    av1 = mean( M(2:end,1) );       
    av2 = mean( [av0 av1] );    
    Amp(1) = av2;                  
    
    % av_val holds the sum of all values that have been averaged
    av_val_sum = 0;
    
    % loop for rest of chi 
    for ccnt = 2:Nchi                       % 2:Nchi
    
        av_val_sum = 0;                     % reset av_val_sum 
        current_chi = chi( ccnt );          % current value of chi
    
        % loop over i vector
        for icnt = 1:Nivar                  % 1:Nivar
    
            current_i = ivar( icnt );
            current_j = (current_chi / (prod * (current_i - 1))) + 1;
            current_t = dt * (current_i - 1);
            current_omega = domega * (current_j - 1);
    
            % values out of range
            if(current_omega > omega_max)
                continue;
            end
    
            % use bilinear interpolation to find an amplitude
            % at current_t and current_omega from matrix M
            % f_x_y is the bilinear interpolated amplitude
    
            % Insert bilinear interpolation code here
    
            % add to running sum
            av_val_sum = av_val_sum + f_x_y;
        end % icnt loop
    
            % compute the average over all i
            av = av_val_sum / Nivar;
    
            % assign the average to Amp
            Amp(ccnt) = av;
    
    end % ccnt loop 
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Problem statement We have one employer that wants to interview N people, and therefore
I have a problem with a continue statement in my C# Foreach loop. I
I have a problem with the SQL statement detailed below. The query returns the
I have a problem with a sql-statement. My DB is MySQL 5.1. I have
I have a problem when trying to execute this update statement (below) using C#
I have a problem creating the following SQL Statement using LINQ & C# select
I have a complex sorting problem with my SQL statement. I have a table
I have an big problem with an SQL Statement in Oracle. I want to
I have problems running a dynamic LIKE statement in my project: this query works
I am trying to solve this problem. I have a series of SELECT statements

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.