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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T15:49:21+00:00 2026-06-15T15:49:21+00:00

I have matrix A which is a 1*11470 struct and each A, for example

  • 0

I have matrix A which is a 1*11470 struct and each A, for example A(1,1) has two elements, nPoints and matrix. I am going to do some calculations and after these calculations, number of elements in the A.matrix will increase 8 times but A.nPoints will be same. I want to do preallocation for this process but I could not find out how. Could you please help me?

note: To make my question clearer, I added two screenshots. What I want is, for example A(1,2).matrix have 3 elements. After doing certain calculations I am going to have 24 elements inside that matrix and I need to preallocate for example a A2 matrix, which has the same length (1*110470) as A, same size for nPoints but 8 times greater size for A(1,k).matrix.

Regards,

enter image description here

enter image description here

  • 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-15T15:49:23+00:00Added an answer on June 15, 2026 at 3:49 pm

    I guess this can solve your problem:

    B = struct ('nPoints',repmat({zeros(1)},1,110470), 'matrix',repmat ({zeros([(max([tracks(:).nPoints])^3) 3])},1,110470));
    

    If it does not please let me know.

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

Sidebar

Related Questions

I have two vectors and I want a matrix which elements are the sum
I have a code base, in which for Matrix class, these two definitions are
Possible Duplicate: correlation matrix in r I have an excel sheet which has 700
I have a matrix which has multiple rows per ID. I need to extract
I have the first matrix which should account for each users (in lines) which
Suppose I have a integer matrix which represents who has emailed whom and how
I have a simple matrix class which has a 2d integer pointer field in
I have a matrix which has the following form: M = [1 4 56
I have two dimensional matrix which stores values between 0 to 1. I want
Say I have a matrix ( MxN ) which has its rows and columns

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.