Message Boards Message Boards

Use the Shannon sampling to find an analytic expression for some 2D data?

Posted 4 years ago

Hello everyone. I am trying to use the Shannon sampling to find an analytic expression for some 2D data as defined in this article.

My data is a 10*10 square with values at (1,1), (1,2), ...(10, 10). If I do it directly, the original data is reconstructed reasonably well. However, if I do a regular interpolaton and then I use the sampling over the obtained function, the results look nothing at all like the original ones. I am doing this as a test to see if I can find an alaytic expression for a dataset with a higher number of values; however, if even using the same number of points coming from the interpolation instead of the original dataset provide with a very different result, does it mean that I can't use this to find out an analytic expression for my original data?.

All my used files are attached to the code in case you want to take a look.

If anyone could tell me why my Shannon interpolation of the original data looks so different from the Shanon interpolation of the regularly interpolated I would be very thankful.

Regards. Jaime.

Note: It looks like the data file cannot be uploaded, so these are the values that I am using as f(x,y) in p8.dat:

1.2350100549134866 1.1044131456029633 0.8252143796872555 0.41301054910385915 -0.10836892884213323 -0.7082659375818571 -1.3510077983552655 -1.9980283698411245 -2.610174591721433 -3.150065272778294 -3.584364557896828 -3.885835812521737 -4.035052595583356 -4.02166150191382 -3.845116092291889 -3.514830673126462 -3.0497357986118536 -2.477252256998665 -1.8317350191029582 -1.1524711615088292 -0.48134417104996735 0.13970050030712816 0.6712387427574124 1.0788436282775988 1.3353002512341565 1.4224182143634947 1.332321531415459 1.0681248069677234 0.6439400882837389 0.08419878794706553 -0.5776847820904113 -1.301240000774928 -2.0413497118392523 -2.751003148270776 -3.384226743889595 -3.8990120607990244 -4.260055581797635 -4.441132307464469 -4.426943868696732 -4.21431137194261 -3.8126218623109227 -3.2434828926377146 -2.539589468608815 -1.7428584799134623 -0.9019343334427434 -0.06921262858568267 0.7024366289352144 1.363041103591947 1.8687774911089532 2.1848892197511356 2.2880746638164586 2.1681804351444383 1.8290763021382215 1.288639349413987 0.5778319500210065 -0.26108268520076267 -1.1770860917724253 -2.1135580052148684 -3.0118415933537213 -3.8149937583116507 -4.471477691688037 -4.938554637953677 -5.18514779201505 -5.193982654882354 -4.962853161325655 -4.504918681685028 -3.848000007180584 -3.032908519647427 -2.110907506790098 -1.140463614175696 -0.18349564659587958 0.6986361285997827 1.4491369830190073 2.0195152688354634 2.372800030560517 2.4860205591718163 2.3517771542023675 1.9787917531605856 1.3913945729381172 0.6279739771969208 -0.2615133648225991 -1.218811097130535 -2.1811961674295466 -3.085622431295128 -3.8728986802575838 -4.491621050417818 -4.901594888938527 -5.076514345992138 -5.005717066735738 -4.694893120574216 -4.165697572072553 -3.4542901093984266 -2.6088978592072127 -1.686563953025538 -0.7493000004245819 0.14009847294304756 0.922291194205585 1.5454003014233004 1.968514198000843 2.1644506402178068

POSTED BY: Jaime de la Mota
5 Replies

I cannot run you code, but maybe this is the problem: Instead of

idata2D = Table[{t, u, ifunc[t, u]}, {t, xmin, xmax, dDelta}, {u, ymin, ymax, dDelta}];

try

idata2D = Flatten[Table[{t, u, ifunc[t, u]}, {t, xmin, xmax, dDelta}, {u, ymin, ymax, dDelta}], 1];
POSTED BY: Henrik Schachner

Thank you very much for your answer. I will try that on monday once I have access to my workplace computer.

POSTED BY: Jaime de la Mota

Maybe you should try posting WL code, so that your fellow contributors can understand better your problem better, and then they can help you more. If you don’t know how to post WL code, have a look at this.

Thank you for your advice. I will edit the code once I have access to my workspace computer again.

POSTED BY: Jaime de la Mota

No problem!

Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard

Group Abstract Group Abstract