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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T17:33:35+00:00 2026-06-03T17:33:35+00:00

I have two expressions in MATLAB that represent a 365×24 matrix. The first expression

  • 0

I have two expressions in MATLAB that represent a 365×24 matrix. The first expression has 10, 365×24 matrices and is therefore

PV_power_output(:,:,K) 

and the second expression which is again 365×24 but with three possible matrices therefore is

WT_energy_supply(:,:,M);ode here

Now, I am looking to create a third matrix that adds the elements in the same position above and thus form a 365×24 matrix. However I want a set of matrix with all possible combinations of the two expressions shown above (therefore this matrix must be 365x24x30.

How do I go about this?
What about the bsxfun function in MATLAB?

  • 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-03T17:33:38+00:00Added an answer on June 3, 2026 at 5:33 pm

    Expand the original matrices (which for clarity I name a and b) with repmat and then just add them, bsxfun is not needed.

    repmat(a,[1 1 size(b,3)]) + repmat(b,[1 1 size(a,3)]))
    

    Update

    >> size(a)
    ans = 
        364  24  10
    
    >> size(b)
    ans = 
        364  24  3
    
    >> c=repmat(a,[1 1 size(b,3)])+repmat(b,[1 1 size(a,3)]);
    >> size(c)
    ans = 
        364  24  30
    

    It looks fine to me. Of course you’ll have to replace my variables a and b with your variables PV_power_output and WT_energy_supply.

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

Sidebar

Related Questions

I'm trying to create an expression tree dynamicly. Let asume that I have two
I have two regular expressions for one user input field that should accept a
I have two regular expressions that I use to validate Colorado driver's license formats.
I have two LINQ expressions that I think I should be able to combine
Possible Duplicate: combining two lamba expressions in c# I have two following expressions: Expression<Func<string,
I have two expressions of type Expression<Func<T, bool>> and I want to take to
I have two regular expressions that validate the values entered. One that allows any
I'm wanting to match a string exactly, for instance I have two expressions that
I have two expressions: public static Expression<Func<int, bool>> IsDivisibleByFive() { return (x) => x
I have two lambda expressions: Expression<Func<MyEntity, bool>> e1 = i = >i.FName.Contain(john); and Expression<Func<MyEntity,

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.