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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T03:44:50+00:00 2026-06-06T03:44:50+00:00

I have the vector output = PV_out(:); I am trying to break this down

  • 0

I have the vector

output = PV_out(:);

I am trying to break this down into some sort of form like – output(K) where output(1) is the first 8760 rows, output (2) is the next 8760 rows etc etc

The vector above is a 236520×1 vector and so I am trying to get 27 “sets” of matrices
does anyone know how to do this?

Thank you

  • 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-06T03:44:52+00:00Added an answer on June 6, 2026 at 3:44 am

    This is a job for reshape:

    %# old_output is 236520x1
    %# desired is 8760 x 1 x 27 matrix 
    new_output = reshape(old_output,8760,1,[]);
    size(new_output) %# [8760 1 27]
       ans = [8760 1 27]
    

    This will create an 8760x1x27 matrix where each row is taken sequentially from the vector that was given to it. Note that you should be careful if you give it a matrix as the first input argument (rather than a vector): you should make sure you know in what order the values are being taken. (Leaving the empty [] means it will automatically pick the right size for that dimension. You will still have an error if the numel of the input isn’t evenly divisible by the dimensions you specify.)

    Edit: changed dimensions according to comment below.

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

Sidebar

Related Questions

I have a vector like this : Sum<-c(24, 32, 40, 48, 56, 28, 36,
I have this data and i need an output like this type of output..
I have a declaration like this #include Output/PtPathWriter.h // class PtPathWriter // I've also
I have the following data structure (an atomic vector?) output from daply in plyr
I have the vector d<-1:100 I want to sample k=3 times from this vector
I have a vector of pairs representing hops between nodes which I would like
I have a std::vector< tr1::shared_ptr<mapObject> > that I'm trying build from data contained in
I'm trying to output a vector of string objects to a file. However, my
Let's just say i have a Vector of Strings, and I want to output
I have some trouble understanding the output from the following code: int main(void) {

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.