Got Questions? Get Answers.
Discover MakerZone

MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi

Learn more

Discover what MATLAB® can do for your career.

Opportunities for recent engineering grads.

Apply Today

Thread Subject:
block average with non-integers

Subject: block average with non-integers

From: Jonathan W Smith

Date: 15 Mar, 2013 21:50:05

Message: 1 of 2

I have an issue.

I have an array with 165 rows and 332 columns. I want to degrade it (i.e. take the average of blocks of the array or make the resolution more course). This is so I apply an array with 41 rows and 71 columns on it. You might say the latter array could be upgraded but that procedure would infuse false data into it.

Lets take array A(165,332) and apply BlockMean
When I use testing = BlockMean(A, 4,4), the resultant matrix has a size of 41 and 83 but not the 41 and 71 that I need.

332/71 = 4.67 , but obviously when I tried BlockMean(A,4,4.67) I obtain an error because non - integers cannot be used.

Also 71 x 4 = 284. This would put me short of 332. How can I take the average of array A that can be averaged for an array with 41 rows and 71 columns?

Thanks

Jonathan

Subject: block average with non-integers

From: dpb

Date: 15 Mar, 2013 23:39:21

Message: 2 of 2

On 3/15/2013 4:50 PM, Jonathan W Smith wrote:
...

> 332/71 = 4.67 , but obviously when I tried BlockMean(A,4,4.67) I obtain
> an error because non - integers cannot be used.
> Also 71 x 4 = 284. This would put me short of 332. How can I take the
> average of array A that can be averaged for an array with 41 rows and 71
> columns?
>

W/O interpolation of some form, the above arithmetic shows you that you
can't. But, since you said you can't (or at least won't) interpolate,
you're stuck.

--

Tags for this Thread

What are tags?

A tag is like a keyword or category label associated with each thread. Tags make it easier for you to find threads of interest.

Anyone can tag a thread. Tags are public and visible to everyone.

Contact us