Student Support Forum: 'moving elements' topicStudent Support Forum > General > Archives > "moving elements"

 < Previous Comment | Next Comment > Help | Reply To Comment | Reply To Topic
 Author Comment/Response Bill Simpson 03/23/13 2:06pm 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. URL: ,

 Subject (listing for 'moving elements') Author Date Posted moving elements augustus 03/21/13 2:10pm Re: moving elements Bill Simpson 03/22/13 00:38am Re: Re: moving elements augustus 03/23/13 1:37pm Re: Re: Re: moving elements Bill Simpson 03/23/13 2:06pm Re: Re: Re: Re: moving elements augustus 03/25/13 10:26am
 < Previous Comment | Next Comment > Help | Reply To Comment | Reply To Topic