 22
 1
 Summary
 I can't define a piecewise function which reads data from a table as #
Hello everyone.
I am trying to do a 2D Shannon interpolation, but I cannot use a sinc because later on this expression goes in an optimization software that doesn't recognize it. I have defined my own version of sinc as:
sincC = Piecewise[{(Sin[Pi* #]/(Pi*(#))), # >= 1}, {1  (#^2)/6 + (#^4)/120  (#^6)/5040, # < 1}] & ;
The problem comes when I use the aforementioned sincC to construct the Shannon interpolation function.
shannonIPC[v_, w_] = Total[#3* sincC[(v  #1)/dDelta]*sincC[(w  #2)/dDelta] & @@@interpolatedData]
interpolatedData is a matrix of three columns and dDelta is a constant equal to 10. The error can be seen in the attached image, but it reads as
Piecewise:The first argument {(0.95493 Sin[1.0472 (1.+v)])/(1.+v),0.333333 (1.+v)>=1} of Piecewise is not a list of pairs. and I am clueless about what to do.
Any advice is welcome.
Thanks for reading.
Regards.
I am trying to do a 2D Shannon interpolation, but I cannot use a sinc because later on this expression goes in an optimization software that doesn't recognize it. I have defined my own version of sinc as:
sincC = Piecewise[{(Sin[Pi* #]/(Pi*(#))), # >= 1}, {1  (#^2)/6 + (#^4)/120  (#^6)/5040, # < 1}] & ;
The problem comes when I use the aforementioned sincC to construct the Shannon interpolation function.
shannonIPC[v_, w_] = Total[#3* sincC[(v  #1)/dDelta]*sincC[(w  #2)/dDelta] & @@@interpolatedData]
interpolatedData is a matrix of three columns and dDelta is a constant equal to 10. The error can be seen in the attached image, but it reads as
Piecewise:The first argument {(0.95493 Sin[1.0472 (1.+v)])/(1.+v),0.333333 (1.+v)>=1} of Piecewise is not a list of pairs. and I am clueless about what to do.
Any advice is welcome.
Thanks for reading.
Regards.
Attachments

24 KB Views: 7