フィルターのクリア

matrices as arguments when calling function

2 ビュー (過去 30 日間)
Ivan Lima
Ivan Lima 2022 年 7 月 25 日
回答済み: Sayan 2023 年 9 月 7 日
I have matrices as arguments of my plotting function:
plotlattice(xc,xs,yc,ys,connect_site_1,connect_site_2,connect_site_3);
My function just plots a figure.
I recieve the error message:
Undefined function 'plotlattice' for input arguments of type 'double'.
Error in hexagonal_lattice_multifigures_surface_functionplot (line 238)
plotlattice(xc,xs,yc,ys,connect_site_1,connect_site_2,connect_site_3);
Thanks
  2 件のコメント
Walter Roberson
Walter Roberson 2022 年 7 月 25 日
do you have a file plotlattice.m ?
James Tursa
James Tursa 2022 年 7 月 25 日
And if you have a plotlattice.m file, is it stored in a directory that is on the MATLAB path?

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

回答 (1 件)

Sayan
Sayan 2023 年 9 月 7 日
I understand from the error you are facing that the function "plotlattice" is not accessible or defined in MATLAB. The possible reasons for the error are mentioned below:
  • Check if the function "plotlattice" is implemented in the code.
  • If it is not implemented, it needs to be defined.
  • If it is defined, check for typos in the function name.
  • Verify if the file in which the function is defined is present in the current directory or in the MATLAB path.
  • To add the folder in which the function file is present, go to the folder and right-click > Add to Path > Selected Folders and Subfolders.
  • Confirm that the necessary dependencies or libraries required for the plotlattice” function are installed and properly imported in your code.
The following documentation can be followed to learn more about MATLAB search path:
Hope this helps in resolving the error.

カテゴリ

Help Center および File ExchangeSearch Path についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by