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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T22:41:22+00:00 2026-06-05T22:41:22+00:00

I have a bunch of values in a 3-dimensional matrix, and I am finding

  • 0

I have a bunch of values in a 3-dimensional matrix, and I am finding the mean value of them:

mean(mean(mat))

Now, of different reasons I have to append some rows and elements to the matrix. But I want the mean value to stay the same – as if the added elements are neutral and do not inflict in the result.

Like when you multiply a bunch of values, you can multiply additional 1’s without changing the result. And with addition you can add further 0’s with no inflict.

What kind of value in Matlab can I assign to the new elements in the matrix to make the elements neutral when using the mean()?

Note added

The point is, when I am calculating the mean value I only have the new resized matrix to do it from. Therefore the added elements must be neutral.

I am thinking of something like NaN, but I had no luck with that since the mean value then also end up as NaN.

  • 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-05T22:41:24+00:00Added an answer on June 5, 2026 at 10:41 pm

    Adding values equal to the mean of the matrix without the added values will leave the new mean the same. (I hope that makes sense!). Point is to fill in and not change the new mean, use the current mean.

    Alternatively, you can fill in with NaN and use the nanmean function.

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

Sidebar

Related Questions

I have a bunch of columns and some columns which are values I need
I have a bunch of text inputs with numeric values: <input type='text' value='25' />
I have a bunch of CSV files. In some of them, missing data are
I have a bunch of named value parameters in a Dictionary<string, object> , which
I have a bunch of objects that have a value and a date field:
I have bunch of strings, some of which are fairly long, like so: movie.titles
week DKK id=radio2 value=75 /> I have bunch of these div entry generated by
I have a single dimensional array of floating point values (c# doubles FYI) and
Ok so i have a bunch of values in a 2*100 dataframe , i
I have a bunch of optional write-in values for a survey I'm working on.

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.