Hi
when I use griddata(x,y,v, xq,yq), x,y,v,xq,yq are all single-precision data to save the memory. but there is an error saying " the input points must be a double array.
However when I checked the online manual for griddata(). it says x,y,z, can be single or double https://www.mathworks.com/help/matlab/ref/griddata.html
So I am wondering how I can use single-precision data in griddata()?
Thanks

1 件のコメント

roudan
roudan 2018 年 4 月 16 日
Thanks Guilaumn.

サインインしてコメントする。

 採用された回答

Guillaume
Guillaume 2018 年 4 月 16 日

0 投票

Yes, it looks like an implementation bug or a documentation bug. The fault lies with scatteredInterpolant which is called by griddata. The doc says that scatteredInterpolant accepts single arrays when it clearly doesn't.

This is worthy a bug report to Mathworks.

It looks like you're out of luck, you can't use singles with griddata.

その他の回答 (2 件)

Jyotish Robin
Jyotish Robin 2018 年 4 月 18 日

0 投票

scatteredInterpolant does not support single inputs. This is a documentation bug and will be corrected.

BISHNUPRIYA SAHOO
BISHNUPRIYA SAHOO 2019 年 9 月 20 日

0 投票

I am also facing similar problem. Please help me to solve.

1 件のコメント

Guillaume
Guillaume 2019 年 9 月 20 日
similar problem to what?
As explained, single data is not supported with griddata. The simple fix is to convert your data to double.

サインインしてコメントする。

カテゴリ

ヘルプ センター および File Exchange で Mathematics についてさらに検索

質問済み:

2018 年 4 月 16 日

コメント済み:

2019 年 9 月 20 日

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by