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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T09:10:37+00:00 2026-06-15T09:10:37+00:00

In my code, I have to multiply a matrix A (dimensions 3×3) to a

  • 0

In my code, I have to multiply a matrix A (dimensions 3×3) to a vector b1 (dimensions 3×1), resulting in C. So C = A*b1. Now, I need to repeat this process n times keeping A fixed and updating b to a different (3×1) vector each time. This can be done using loops but I want to avoid it to save computational cost. Instead I want to do it as matrix and vector product. Any ideas?

  • 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-15T09:10:38+00:00Added an answer on June 15, 2026 at 9:10 am

    You need to build a matrix of b vectors, eg for n equal to 4:

    bMat = [b1 b2 b3 b4];
    

    Then:

    C = A * bMat;
    

    provides the solution of size 3×4 in this case. If you want the solution in the form of a vector of length 3n by 1, then do:

    C = C(:);
    

    Can we construct bMat for arbitrary n without a loop? That depends on what the form of all your b vectors is. If you let me know in a comment, I can update the answer.

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

Sidebar

Related Questions

I need to multiply a matrix and a vector. To accomplish that I have
I have a matrix multiply code that looks like this: for(i = 0; i
I have a Matrix multiply code that does matrix multiply by the following Where
I have the following code that I need to run over a matrix with
I have multiple ajax requests with javascript code as response, and I need to
I have this code to open multiple files one at a time that is
I have this HTML code multiple times one after the other: <li> <img src=path/to/my/picture.jpg
I'd like to multiply a random number vector PT(n)=rand(1,n) by a matrix M(mxn) but
I have the following code: [~,ind]=max(Defender.Q,[],6); Defender.Q is a HUGE multidimensional matrix. When there
I have some code that I have inherited that generates a matrix of significance

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.