Find zero crossings in multidimensional matrix

Hello,
I have a multidimensional (5-D) matrix that is a sparse sampling of a smooth function. I would like to interpolate to find the coordinates where the matrix is zero. Does anyone know a way to do this?
Thank you Nate

回答 (1 件)

Bish Erbas
Bish Erbas 2018 年 9 月 26 日

0 投票

Code below finds all zero elements of the example 2x2x5 matrix.
B = repmat([0 1],[2 2 5]);
B(B==0)

4 件のコメント

Guillaume
Guillaume 2018 年 9 月 26 日
My understanding of the question is that the matrix does not contain the zeros. The zeros would be found by finding adjacent points that have different sign and interpolating between them.
Also, the matrix is sparse.
Nate
Nate 2018 年 9 月 26 日
Thank you for your answer.
I think I wasn't clear. The matrix does not have zeros in it, but it crosses zero at multiple points.
I was wondering if there was anything like crossing.m in the file exchange that would work with multidimensional data.
Nate
Nate 2018 年 9 月 26 日
Guillaume is correct. However, my matrix isn't sparse though (bad choice of words on my part).
Bish Erbas
Bish Erbas 2018 年 9 月 26 日
Sorry for my misunderstanding.

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

カテゴリ

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

質問済み:

2018 年 9 月 26 日

コメント済み:

2018 年 9 月 26 日

Community Treasure Hunt

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

Start Hunting!

Translated by