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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T05:41:49+00:00 2026-05-26T05:41:49+00:00

Quite hard to explain what I am looking for, I have an image represented

  • 0

Quite hard to explain what I am looking for, I have an image represented as a m by n matrix in Matlab and I am trying to scale it down to 4×4 the same way an image would be scaled (average the nearest values)

So for example

1 2 3 4 5 6 7 8
1 2 3 4 5 6 7 8
0 2 3 4 9 9 7 8
0 2 3 4 9 9 7 8
1 2 3 4 5 6 7 8
1 2 3 4 5 6 7 8
1 2 3 4 5 6 7 7
1 2 3 4 5 6 7 7

Would become

1.5 3.5 5.5 7.5
1.0 3.5 9.0 7.5
1.5 3.5 5.5 7.5
1.5 3.5 5.5 7.0
  • 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-05-26T05:41:49+00:00Added an answer on May 26, 2026 at 5:41 am

    Looks like imresize gives something slightly different from what you expected. For your input data, the following will work:

    A = filter2([1 1; 1 1] / 4, X, 'same')
    A = A(1:2:end, 1:2:end);
    

    EDIT: Actually, it’s probably faster to do the following:

    i = 1:2:size(A,1)-1;
    j = 1:2:size(A,2)-1;
    
    B = 0.25 * (A(i,j) + A(i+1,j) + A(i,j+1) + A(i+1,j+1));
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

It's quite hard to explain what I'm trying to do, I'll try: Imagine a
This is quite hard to explain. I have a class which should support the
Have looked quite hard for this answer but having no luck. I have 3
It is quite hard to tell so I upload an image to show my
It's quite hard to explain in question title, however what I want to achieve
I can't seem to quite find what I need. Without trying too hard to
Iam trying to do the exercises in the book Learn Python the hard way
I'm trying to learn Python with the help of Learning Python the Hard Way.
We have an ordering system that is currently quite hard coded. We would like
My problem is quite hard to explain clearly... I call a phonegap plugin to

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.