http://www.mathworks.com/matlabcentral/newsreader/view_thread/331563
MATLAB Central Newsreader  shrink 3 dimensional array and adjust values logaritmically
Feed for thread: shrink 3 dimensional array and adjust values logaritmically
enus
©19942015 by MathWorks, Inc.
webmaster@mathworks.com
MATLAB Central Newsreader
http://blogs.law.harvard.edu/tech/rss
60
MathWorks
http://www.mathworks.com/images/membrane_icon.gif

Thu, 12 Sep 2013 23:14:08 +0000
shrink 3 dimensional array and adjust values logaritmically
http://www.mathworks.com/matlabcentral/newsreader/view_thread/331563#911149
Jonathan W Smith
Hello<br>
<br>
Let's say I have an array of size 4 4 4<br>
<br>
Let's say I wanted to shrink the matrix to size 4 4 3. Lets say integer values are assigned to each element of the array.<br>
<br>
As opposed to just deleting the one row of the 3rd dimension, how can remove a row and adjust the values logarithmically in the remaining three parts of the 3rd dimension? <br>
<br>
I think of a function like blockmean(), but it only would adjust the values by finding the means as opposed to logarithmically.<br>
<br>
Thanks<br>
<br>
Jonathan

Thu, 12 Sep 2013 23:52:52 +0000
Re: shrink 3 dimensional array and adjust values logaritmically
http://www.mathworks.com/matlabcentral/newsreader/view_thread/331563#911151
dpb
On 9/12/2013 6:14 PM, Jonathan W Smith wrote:<br>
> Hello<br>
><br>
> Let's say I have an array of size 4 4 4<br>
><br>
> Let's say I wanted to shrink the matrix to size 4 4 3. Lets say integer<br>
> values are assigned to each element of the array.<br>
><br>
> As opposed to just deleting the one row of the 3rd dimension, how can<br>
> remove a row and adjust the values logarithmically in the remaining<br>
> three parts of the 3rd dimension?<br>
> I think of a function like blockmean(), but it only would adjust the<br>
> values by finding the means as opposed to logarithmically.<br>
<br>
The 3rd dimension you'd remove would be a plane, wouldn't it?<br>
<br>
How do you want to set the limits the original limits of first/last <br>
plane values or those remaining after the deletion first?<br>
<br>
I posted an example of interp1() for logarithmic interpolation just a <br>
day or two ago at mostsame idea'll work here. It was on the Answers <br>
forum though so here...for the two vectors in y(1:2,:) for that poster <br>
and the midpoint of 15 between the two values of 15:25 for independent <br>
variables...<br>
<br>
10.^(interp1([5 25]',log10(y),15))<br>
<br>


Fri, 13 Sep 2013 13:44:09 +0000
Re: shrink 3 dimensional array and adjust values logaritmically
http://www.mathworks.com/matlabcentral/newsreader/view_thread/331563#911178
Jonathan W Smith
dpb <none@non.net> wrote in message <l0tk58$lff$1@speranza.aioe.org>...<br>
> On 9/12/2013 6:14 PM, Jonathan W Smith wrote:<br>
> > Hello<br>
> ><br>
> > Let's say I have an array of size 4 4 4<br>
> ><br>
> > Let's say I wanted to shrink the matrix to size 4 4 3. Lets say integer<br>
> > values are assigned to each element of the array.<br>
> ><br>
> > As opposed to just deleting the one row of the 3rd dimension, how can<br>
> > remove a row and adjust the values logarithmically in the remaining<br>
> > three parts of the 3rd dimension?<br>
> > I think of a function like blockmean(), but it only would adjust the<br>
> > values by finding the means as opposed to logarithmically.<br>
> <br>
> The 3rd dimension you'd remove would be a plane, wouldn't it?<br>
> <br>
> How do you want to set the limits the original limits of first/last <br>
> plane values or those remaining after the deletion first?<br>
> <br>
> I posted an example of interp1() for logarithmic interpolation just a <br>
> day or two ago at mostsame idea'll work here. It was on the Answers <br>
> forum though so here...for the two vectors in y(1:2,:) for that poster <br>
> and the midpoint of 15 between the two values of 15:25 for independent <br>
> variables...<br>
> <br>
> 10.^(interp1([5 25]',log10(y),15))<br>
> <br>
> <br>
> <br>
Thanks. The dimension I remove would be a plane. The first/last remain after the plane is removed. Does this effect the interpolation above? Thanks

Fri, 13 Sep 2013 14:08:27 +0000
Re: shrink 3 dimensional array and adjust values logaritmically
http://www.mathworks.com/matlabcentral/newsreader/view_thread/331563#911184
dpb
On 9/13/2013 8:44 AM, Jonathan W Smith wrote:<br>
> dpb <none@non.net> wrote in message <l0tk58$lff$1@speranza.aioe.org>...<br>
>> On 9/12/2013 6:14 PM, Jonathan W Smith wrote:<br>
>> > Hello<br>
>> ><br>
>> > Let's say I have an array of size 4 4 4<br>
>> ><br>
>> > Let's say I wanted to shrink the matrix to size 4 4 3. Lets say integer<br>
>> > values are assigned to each element of the array.<br>
>> ><br>
>> > As opposed to just deleting the one row of the 3rd dimension, how can<br>
>> > remove a row and adjust the values logarithmically in the remaining<br>
>> > three parts of the 3rd dimension?<br>
>> > I think of a function like blockmean(), but it only would adjust the<br>
>> > values by finding the means as opposed to logarithmically.<br>
>><br>
>> The 3rd dimension you'd remove would be a plane, wouldn't it?<br>
>><br>
>> How do you want to set the limits the original limits of first/last<br>
>> plane values or those remaining after the deletion first?<br>
>><br>
>> I posted an example of interp1() for logarithmic interpolation just a<br>
>> day or two ago at mostsame idea'll work here. It was on the Answers<br>
>> forum though so here...for the two vectors in y(1:2,:) for that poster<br>
>> and the midpoint of 15 between the two values of 15:25 for independent<br>
>> variables...<br>
>><br>
>> 10.^(interp1([5 25]',log10(y),15))<br>
>><br>
>> <br>
>><br>
> Thanks. The dimension I remove would be a plane. The first/last remain<br>
> after the plane is removed. Does this effect the interpolation above?<br>
> Thanks<br>
<br>
No, it only determines what you use for the X,Y values in the argument <br>
list  the initial values or those remaining.<br>
<br>
For the plane it is probably simpler to use arrayfun() on logspace() as <br>
the operating function than to propagate the interp1 output across the <br>
grid  the above would be a single row.<br>
<br>
