Mathematica 9 is now available
Student Support Forum
Student Support Forum > General > > "moving elements"

Post Reply:
Email Address:

Please send email when my message is replied to.

Url (optional):
Message: view original message?
Attachment (optional):
Please answer this:3+1 =

Original Message (ID '427794') By Bill Simpson:
In Response To 'Re: Re: moving elements' --------- Your example data was fine. If you had shown what the answer should have been then someone would have been able to check whether their method was correct or not. Here is what I think you are asking for In[1]:= v={{4,6,3,5},{6,6,2,3},{3,6,3,3},{7,7,4,5},{5,7,2,2},{5,5,3,4}}; vp=Partition[v,2,1]; f[{{a_,b_,c_,d_},{e_,f_,g_,h_}}]:=Max[Max[f-g,Abs[f-d]],Abs[g-d]]; Map[f,vp] Out[4]= {4,3,4,5,3} Look at the value of vp to see how it is grouping your original quads into pairs that overlap. That will give something where you can then work on first and second lists. Then the f function tries to calculate the answer for a particular pair of quads. And finally the Map function tries to do this to all the pairs. If this is not correct then post a description of how you would do the problem with your original data and tiny step by tiny step. With that perhaps someone can see how to fix the errors and get what you want.