how does trimr function work
9 ビュー (過去 30 日間)
古いコメントを表示
my code is having a command as given below
xnew=trimr(mini,maxi,xnew)
how does this command work. while running the code there is no error, but when trimr function is separately run in the command window, it is displayed as an undfined function
0 件のコメント
回答 (2 件)
Akshat
2025 年 1 月 29 日 18:33
The function "trimr" does not exist as an inbuilt function in MATLAB.
The reason why the code does not give an error might be because it has a declaration of a function with the name "trimr". Please refer to the codebase you have, you should find the function.
Hope this helps!
0 件のコメント
Walter Roberson
2025 年 1 月 29 日 19:42
The code for trimr is shown in https://www.mathworks.com/matlabcentral/answers/452463-functions-may-be-used-incompatibly-or-redefined
It is a local function, declared as a second function inside a .m file. As such it is not directly callable outside of the .m file.
In order to be callable outside of the .m file it is inside, the first function in the .m file would have to create a handle to the trimr function and pass out the handle.
0 件のコメント
参考
カテゴリ
Help Center および File Exchange で Get Started with MATLAB についてさらに検索
製品
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!