- Since backwardTape is a built-in function, you won't find its source code directly. However, you can access its functionality through the MATLAB debugger by typing edit backwardTape in the MATLAB command window. This will open the file if it's accessible.
- Once you understand the functionality of backwardTape, you can create your own version with the modifications you need. You can write this custom function in a MATLAB script file (.m file) and save it to your local drive.For example, you might create a file called my_backwardTape.m and define your modified version of the function there.
- Inside your custom function, you can modify the behavior as needed. Make sure to retain the same function signature (input and output arguments) so that your code continues to work seamlessly with existing code.
- MATLAB searches for functions in the current folder and any folders on the MATLAB path. Make sure the folder containing your custom function is on the MATLAB path.
- Instead of calling the built-in backwardTape, call your custom version (my_backwardTape) in your code.
backwardTape used in MATLAB2021a
6 ビュー (過去 30 日間)
古いコメントを表示
I need to make some modification in built-in function when called backwardTape"
grad = backwardTape(tm,{y},{initialAdjoint},x,retainData,false,0);"
at MATLAB2021a. However, I could see the nested function when called
grad = backwardTape(tm,{y},{initialAdjoint},x,retainData,false,0)
But where is the backwardTape function? As I am running MATLAB in a cluster so I don't have authority to overwrite the built-in function called by backwardTape so I need to save some functions in my drive that I could overwrite functions.
0 件のコメント
回答 (1 件)
Sanju
2024 年 5 月 7 日
If you want to modify the behavior of the backwardTape function in MATLAB, but you don't have the authority to overwrite the built-in function directly, you can create your own version of the function and save it to your local drive.
Here's an outline,
Additionally, saving your custom function to your local drive ensures that you can access and use it regardless of where you're running MATLAB.
Hope this helps!
0 件のコメント
参考
カテゴリ
Help Center および File Exchange で Introduction to Installation and Licensing についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!