MNPBEM Error - Issue with dot product in tripolygon file

6 ビュー (過去 30 日間)
Aishi
Aishi 2025 年 7 月 1 日
回答済み: Image Analyst 2025 年 7 月 1 日
Hi,
I'm new to MATLAB and the MNPBEM toolbox - I'm trying to write a code to simulate a gold nanoparticle on a diamond substrate to demonstrate the SERS effect. I keep getting this error:
"Dot indexing is not supported for variables of this type.
Error in tripolygon (line 18)
if all( ~isnan( edge.pos( :, 1 ) ) ) || ..."
^^^^^^^^^^^^^^^^
followed by:
Error in aunp_SERS_1 (line 37)
slab = tripolygon(faces, vertices);
^^^^^^^^^^^^^^^^^^^^^^^^^^^
(where aunp_SERS_1 is the name of my project). Not sure how to fix this as I cannot edit the tripolygon file as it is part of the toolbox! Please let me know what to do :)

回答 (2 件)

Torsten
Torsten 2025 年 7 月 1 日
編集済み: Torsten 2025 年 7 月 1 日
The variable "edge" does not seem to have a substructure with name "pos".
E.g.
s = 2;
s.pos
Dot indexing is not supported for variables of this type.
will give this error message.
Check your inputs to "tripolygon" (faces,vertices) for correctness (or the inputs to whatever function with which you call the toolbox).
Do the test problems included in the toolbox work for your MATLAB version ?

Image Analyst
Image Analyst 2025 年 7 月 1 日
That does not seem to be a Mathowrks toolbox. I suggest you supply your faces and vertices in a .mat file to the publishers of that MNPBEM toolbox and ask them.

カテゴリ

Help Center および File ExchangeOperating on Diagonal Matrices についてさらに検索

製品


リリース

R2025a

Community Treasure Hunt

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

Start Hunting!

Translated by