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

  • Home
  • SEARCH
  • 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 7505247
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 29, 20262026-05-29T21:50:49+00:00 2026-05-29T21:50:49+00:00

For example, I have 6 similar Matrices (Matrix A1 to A6) but with different

  • 0

For example, I have 6 similar Matrices (Matrix A1 to A6) but with different data.

Matrix A1:

2011/1/1 23.00 33.00 23.00 35.00 …

2011/1/2 19.00 20.00 22.00 22.00 … …

I want to combine these 6 Matrices and create a new Matrix B.

The Matrix B will have: 6 columns and the length of the row equals (length(column of A)-1).

The first column of Matrix B is Matrix A1’s first row (exclude date).

The second column of Matrix B is Matrix A2’s first row (exclude date)…and so on…

I am looking for a script. Thanks!

  • 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-29T21:50:50+00:00Added an answer on May 29, 2026 at 9:50 pm
    B = [A1(1,2:end); A2(1,2:end); A3(1,2:end); A4(1,2:end); A5(1,2:end); A6(1,2:end)]';
    

    or

    B = [A1(1,2:end)' A2(1,2:end)' A3(1,2:end)' A4(1,2:end)' A5(1,2:end)' A6(1,2:end)'];
    

    UPDATE:

    Instead of having multiple matrices with different names consider using cell array where each cell contains a matrix. If A is a cell array,

    A = {A1, A2, A3, A4, A5, A6};
    

    then you can access k-th matrix as A{k}. In this case you may have different number of matrices in the cell array and get B in a vectorized manner using, for example, this code:

    B = cell2mat(cellfun(@(x) x(1,2:end)', A, 'uniformoutput',0));
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a table similar to this: CREATE TABLE example ( id integer primary
I have two web-sites: example.com and yyy.com They both have similar web apps, but
I have similar methods that needs to be implemented for different concepts. But call
(Please note: I have one similar question active - but it's completely different as
I mod_rewrite my pages very similar to how SO does it. I have www.example.com/users/login/
I have a simple marker annotation for methods (similar to the first example in
We have a Union Query. Here's a basic (similar) example: SELECT a.Name, b.Info FROM
I have a simple Atom 1.0 feed that I've generated, similar to the example
For simplicities sake, I'll make up a similar example to what I have: Let's
I have some data similar to the following chart: http://developer.yahoo.com/yui/examples/charts/charts-seriescustomization_clean.html Only difference is that

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.